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

Forums / Developing with Sitefinity / default ID for main content placeholder

default ID for main content placeholder

4 posts, 0 answered
  1. Matt
    Matt avatar
    4 posts
    Registered:
    05 Sep 2013
    01 Oct 2013
    Link to this post
    So I have built some Master Pages for our SiteFinity site and implemented them in some Page Templates.  I want to convert our pages to use the Master Pages, but I don't want them to lose the content.  I'm hoping I can achieve this by finding the default ID for the main content <asp:ContentPlaceHolder> and putting it in my Master Page.  Is this even possible with Master Pages?
  2. Pavel Benov
    Pavel Benov avatar
    341 posts
    Registered:
    14 Mar 2016
    04 Oct 2013
    Link to this post
    Hello Matt,

    You can test with the following API to change the template of your pages.

    http://www.sitefinity.com/documentation/documentationarticles/developers-guide/sitefinity-essentials/pages/setting-template-to-pages

    And how to assign controls:

    http://www.sitefinity.com/documentation/documentationarticles/developers-guide/sitefinity-essentials/pages/adding-and-removing-controls

    I hope this helps.

    Regards,
    Pavel Benov
    Telerik
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Matt
    Matt avatar
    4 posts
    Registered:
    05 Sep 2013
    04 Oct 2013 in reply to Pavel Benov
    Link to this post
    Pavel, thanks for replying.  I'm not sure I explained the problem correctly.  The templates used in our implementation of Sitefinity 6.1 were built in the CMS.  No Master Pages were used in the creation of these templates.  I want to convert these pages to go from the CMS generated templates to the templates I have created with my customized Master Pages.  The Master Pages don't seem to have the correct ContentPlaceHolder ID for the body section.  When I view the pages in Sitefinity with the old templates, the content is there and functional.  When I switch to my new templates, the content disappears, leading me to believe I don't have the correct ID assigned to the ContentPlaceHolder.  All I want to know is how to find the ID that is being used for that section so I can put it in my ContentPlaceHolder for the main content area.  I didn't see anything in the provided links that would help me achieve that.  Full Disclosure:  I am not a C# developer, I'm a UI developer with experience working in C# environments.  Some of the stuff in those links was kind of over my head. :-/  Any help you could provide to point me in the right direction would be greatly appreciated.  Thanks!

    Matt
  4. Pavel Benov
    Pavel Benov avatar
    341 posts
    Registered:
    14 Mar 2016
    09 Oct 2013
    Link to this post
    Hello Matt,

    Do you have a content placeholder in the head tag of your master page? If you have please remove it and test to see if the controls will disappear again. On a side note when you switch the template the widgets will be placed in a auto generated placeholders and grayed out so you will need to drag them to their respectful places. 

    Additionally a video of  the behavior you are experiencing will be really helpful.

    Regards,
    Pavel Benov
    Telerik
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
4 posts, 0 answered