More in this section

Forums / Developing with Sitefinity / Adding generic content controls to templates

Adding generic content controls to templates

5 posts, 0 answered
  1. Sang
    Sang avatar
    13 posts
    Registered:
    14 May 2008
    20 Jun 2008
    Link to this post
    Is is possible to add a generic content control to a template, so that when a user creates a page and selects that template, the generic controls will already be in the template?
  2. Sang
    Sang avatar
    13 posts
    Registered:
    14 May 2008
    20 Jun 2008
    Link to this post
    I tried this...

    <asp:ContentPlaceHolder ID="CommunityDescription" runat="server"></asp:ContentPlaceHolder><sfWeb:GenericContent ID="CommunityContent" runat="server">editable?</sfWeb:GenericContent>

    and the generic content controls are not editable when I create the page...is there something I'm missing?
  3. Sang
    Sang avatar
    13 posts
    Registered:
    14 May 2008
    20 Jun 2008
    Link to this post
    I meant I tried this...

    <asp:ContentPlaceHolder ID="CommunityDescription" runat="server"><sfWeb:GenericContent ID="CommunityContent" runat="server"></sfWeb:GenericContent></asp:ContentPlaceHolder>   
  4. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    Registered:
    18 Jul 2012
    20 Jun 2008
    Link to this post
    I tried to do this, but it instead makes whatever you put into that template be hard-wired (in other words, uneditable) to all of the pages under that template.

    I think this would be a good idea to enable certain controls to be global. I also think it would be a good idea that when you add a control to a master page template, that it doesn't block out the whole contentplaceholder, but merely adds it automatically. currently if you add something to the master page template, that contentplaceholder gets greyed out of the editor.
  5. Pepi
    Pepi avatar
    981 posts
    Registered:
    31 Jan 2017
    24 Jun 2008
    Link to this post
    Hello SelArom,

    Unfortunately, the required functionality is not possible in Sitefinity for now. Every control that is declared directly in the master page cannot be modified (is not editable) through the Sitefinity interface. The workaround is to use different master pages with different settings for the corresponding control. If you need to change the control on every page, then it is better to put it in the page, and not in the master page.

    Regards,
    Pepi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Register for webinar
5 posts, 0 answered