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

Forums / Designing & Styling / Switchable templates and content placeholders

Switchable templates and content placeholders

2 posts, 0 answered
  1. Dave
    Dave avatar
    29 posts
    Registered:
    31 Oct 2011
    14 Nov 2012
    Link to this post
    We're finally in the midst of deploying a Sitefinity site. Due to some resource restrictions, we've decided to temporarily move forward with a Sitefinity implementation of our existing website template, and switch to a more modern design in the near future.

    I'm wondering how to build the two templates so that I can easily swap them in the back-end. Currently, if I lay out two templates in the back end, and try and change the template assigned to a page, content is left orphaned in the designer. I'm guessing this is because SF is generating different content placeholder IDs, so the designer and renderer aren't sure where to put the content.

    How can I overcome this problem?
  2. Ivaylo Angelov
    Ivaylo Angelov avatar
    68 posts
    Registered:
    27 Oct 2016
    16 Nov 2012
    Link to this post
    Hello David,

    Thank you for contacting us.

    Changing page templates indeed results in some layout issues which can be fixed manually.
    When a template is changed, if the control does not have a specified placeholder on the new template, it will either be automatically placed on the first available content placeholder or appear as semi-transparent, indicating that it needs to be placed in a valid placeholder in order to be displayed on the front-end. Usually, a quick rearrange using drag & drop is needed to put everything back to where it belongs.
    What can further be indicated as a problem might be a mismatch in your CSS. One of the ways to avoid this is to give your layout element a CSS class for its wrapper. With this you can easily reuse existing rules in your stylesheet.
    Another thing that might be done is using set IDs for the ContentPlaceholders directly on the new Master Template. All pages that will get this template will have their elements automatically recognize the block where they should go when the template is changed.

    I hope this information helps. Wish you a great day.

    All the best,
    Ivaylo Angelov
    the Telerik team
    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
2 posts, 0 answered