+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Question about changing Forum Templates

Question about changing Forum Templates

3 posts, 0 answered
  1. Blake
    Blake avatar
    10 posts
    Registered:
    28 Jul 2009
    07 Feb 2011
    Link to this post
    Hey Sitefinity,

    Is it possible to change the layout template for the Forums module, without changing the actual /Sitefinity/ControlTemplates/Forums/etc... ?

    For example, rather than modify the existing /Sitefinity/ControlTemplates/Forums/(ForumList.ascx,SingleThread.ascx, etc) can I copy these files to a /Custom/ directory and then tell Sitefinity to use the custom templates (like other controls have)?  How would I tell Sitefinity to use these new templates as opposed to the ones out-of-the-box?  Is this even possible?  I like having the original templates and the new templates (so I can compare).

    Thanks!

    Blake
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    07 Feb 2011
    Link to this post
    Hello Blake,

    Forums is not Generic Content base module. You can set external templates if you create a custom provider
    that inherits from Telerik.Forums. ForumProvider and replace the default one.
    Inside the provider you can override the public properties like

    • ForumListTemplate
    • SingleThreadTemplate
    • EditPostTemplate
    • EditThreadTemplate



    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Blake
    Blake avatar
    10 posts
    Registered:
    28 Jul 2009
    07 Feb 2011
    Link to this post
    Hey Ivan,

    Thanks for the response.  You got me going in the right direction.

    Turns out that I could change the control template in the Sitefinity provider string.

    See the following code:

        <forums defaultProvider="Sitefinity">
                <providers>
                    <clear/>
                    <add name="Sitefinity" securityProviderName=""
                 profileProviderName="Sitefinity"
                 type="Telerik.Forums.Data.DefaultProvider, Telerik.Forums.Data" connectionStringName="DefaultConnection" visible="true"
                 forumListTemplate="~/Custom/ControlTemplates/Forums/ForumList.ascx"             
                 />
                </providers>
            </forums>

    I could specify forumListTemplate and change the control template that way.

    Thanks for the help!

    Blake
Register for webinar
3 posts, 0 answered