Set Default ContentPlaceholder

Posted by Community Admin on 05-Aug-2018 14:09

Set Default ContentPlaceholder

All Replies

Posted by Community Admin on 23-Aug-2013 00:00

Right now if you change a template and Sitefinity can't find the placeholder to put controls into, it just blindly hurls everything into the first placeholder...this is AMAZINGLY annoying, try to explain it to and end user.

I want the ability on my templates (or just the root one) to assign a "Default" such that everything goes into there instead of into my header...and potentially my invisible mobile nav (which is in the header)

Posted by Community Admin on 28-Aug-2013 00:00

Hi,

If you have some controls on a page, these controls are placed inside placeholders. When the template is changed the system is trying to find placeholders in the new template that have the same id as the placeholders from the page. If it is not able to find such placeholders all of the controls are placed in one free placeholder on outside any placeholders if it could not find a free one. This is the default behavior of Sitefinity.

We could add a feature request for you regarding the ability to place the controls on a default placeholder when the template of the page is changed.

Regards,
Stefani Tacheva
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

Posted by Community Admin on 28-Aug-2013 00:00

Right I know how it works, thats why I outlined it as well...however I disagree with "finds a free one".

  On my site(s) it goes to the FIRST one...even if there's something in it.  Example being my first placeholder contained my mobile nav widget.  When I changed templates it threw all the controls\layouts inside of that so I could only get to them by firebugging it visible or shrinking down to smartphone size to drag them out.

Yes please the request is to define a default one because the logic to find another can't cover every scenario.

Posted by Community Admin on 28-Aug-2013 00:00

@Steve

At the moment i haven an extra empty placeholder on the bottom and tell users if they switch they should move the content there first. I had the problem that the contenst were thrown into palceholders where I could not get them out of anymore.

@Telerik
For me the ideal solution could be

a) we are finaly able to name our placeholder in a non complicated, no hack programming way
b) if you switch templates and there is no match in the names we gave to the placeholder you will get a table asking you for each not matching (or even all) contens where they come from and where they should go.

Kind of

content_block_1   from: placeholder1      to:placholder1
content_block_2   from: placehodler2      to: choose placeholder 

@Steve again
I know this is not realy though through and might even be a dumb idea - but its an idea.
-> and we would get the naming of placeholders back :-)

Markus

Posted by Community Admin on 28-Aug-2013 00:00

@Markus

 I put an empty one at the top of the page that I hide on live, but in design mode (if content is in it, it appears)...I don't want the scenario where they forget to move stuff...seems to work okay, but seems unnecessary.

Don't you think the table would be a pain in the butt\messy?  Think about it...would it show widgets, layouts, both.  I think if we just set a default and everything plopped into there the suer could move stuff back out if needed.  MOST of the time the master is the same, its just the content area placeholders changing.

This thread is closed