Changing Page Template Issue

Posted by Community Admin on 05-Aug-2018 16:08

Changing Page Template Issue

All Replies

Posted by Community Admin on 14-Apr-2011 00:00

Have a page with a template called "Resources" and there are content blocks with text within that page. The Resources template was based on a base template called "Subpage".

I created a new template called "News" based on "Subpage" just like Resources was based off of.

When I change the template on my page from Resources to News, I lose all the content blocks. They are simply gone like it's a brand new page. The page is not renamed or anything, just moved to Draft status with no content.

Is this correct?

I have hundreds of pages to change templates on.

Anybody have a suggestion on how best to change templates on hundreds of pages without having to rebuild each page?

Thanks in advance.

Posted by Community Admin on 15-Apr-2011 00:00

Hi Chris,

I'm sorry to hear about issues you've been experiencing regarding this functionality. This is happening because the widgets get associated with the placeholders on the template, and once you change the template the widgets "don't know" to which placeholder to associate, that's why they just become orphaned and don't get displayed. I agree with you that this behavior might be unexpected and cause problems, and we are discussing how we can improve this. Any suggestions are welcome. In the meantime, Lyubomir Dokov provided a sample code which offers a solution to the problem. You can track his reply and get hte code sample on this forum thread. Please take a look at it and try the proposed solution.
I hope you find this information useful. If you need any further help, please do not hesitate to write back.

Regards,
Boyan Barnev
the Telerik team


Posted by Community Admin on 15-Apr-2011 00:00

What if you just disallowed deleting\changing of templates if there are child pages who's content WILL become orphaned....?

Or at least start version the templates so when I have someone BREAK a template I can roll it back

Posted by Community Admin on 18-Apr-2011 00:00

Hello Steve,

Thanks for the suggestion, as I mentioned in my previous reply, customer feedback is very important, so it will be taken into consideration. We already have implemented warning messages that do not allow deletion of templates who have pages based on them, so a similar warning when changing a template is a possible  option.

Regards,
Boyan Barnev
the Telerik team


Posted by Community Admin on 18-Apr-2011 00:00

Thanks for the response to this post. It is appreciated. We will try to code that you've provided and see what happens.

I will say for the record as a Sitefinity partner that not being able to change templates on a page within in a quality CMS like Sitefinity is a fairly large miss. Changing templates freely is exactly the point of having a CMS. As a technical company, we will be able to work around this, but as we hand our sites off to our clients to manage on their own, it poses a large risk for them and exposure for us to not have this feature in place.

I'm not proposing a warning pop up as much as I am a fix. Please add this to your road map asap. We'll speak with our partner contact at Sitefinity to make sure our request is formally submitted.

In the meantime, I will say that we couldn't live without this forum. Your responsiveness and quality of responses has been a big help to us over the years. Thanks for that.

Posted by Community Admin on 19-Apr-2011 00:00

Hi Chris,

Thank you for the understanding and  the constructive feedback. Please be assured that we have our attention focused on this problem and we will be working on its resolution. 

Best wishes,
Boyan Barnev
the Telerik team

Posted by Community Admin on 30-Jul-2011 00:00

What is the current status of this issue? I am running 4.1 SP3.

Is there a recommended work-around? Can I create a different template as long as I use the same class names for the target regions?

I need to be able to switch templates as well. We retain the same base template with common header/footer, but will switch between 1, 2, and 3 column pages depending on the current content needs.

Posted by Community Admin on 01-Aug-2011 00:00

Hello Dan Sorensen,

Currently there should be no problems implementing the described scenarios - witht he changes we have introduced, now when a template is changes, if the controls do not have a specified placeholder on the new template, they will either be automatically placed in the first available content placeholder, or appear as semi-transparent, indicating that they need to be placed in a valid placeholder in order to be displayed on the frontend.

Best wishes,
Boyan Barnev
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