Switchable templates and content placeholders

Posted by Community Admin on 05-Aug-2018 10:34

Switchable templates and content placeholders

All Replies

Posted by Community Admin on 14-Nov-2012 00:00

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?

Posted by Community Admin on 16-Nov-2012 00:00

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

This thread is closed