Plugins can be hidden when changing Page Template

28 views
Skip to first unread message

czpython

unread,
Aug 7, 2017, 2:39:45 PM8/7/17
to django CMS developers
django-cms 3.4.4
Plugins will often be lost or left behind when a page's template is changed, where the placeholder names are different or there are different placeholders. There's no way to see plugins that are 'in the trash can' as it where.
The work around currently is to change a page back to it's original template, cut the plugin, change the page to the new template and paste it in. Of course this isn't create user interface design.
A way to solve this (and maybe even #4512) is to have a Trash can placeholder, a bit like the clipboard placeholder, but it holds ANY plugin which doesn't have a valid placeholder for the currently page template. This means migrating sites to new templates would be possible and hiding plugins would be simply a matter of parking them in the trash can.
If the divio devs like the idea, but don't have time, I can code a patch. But a positive opinion would be useful before I do any work.

czpython

unread,
Aug 9, 2017, 8:18:34 PM8/9/17
to django CMS developers
 Hello @Martin,

Because plugins have a direct relationship to their placeholders, I would rather not move these automatically every time the user changes a page's template.
This can cause sync problems, as well as other data corruptions.

That said, when a template changes, the placeholders that are no longer in the template still remain in the database, the cms does not delete them (by design).
We can leverage this to create an "archived" placeholders section in structure mode which can be enabled/disabled (to avoid showing them all the time), and all this would do is fetch the placeholders
from the database instead of from the template, then just render the structure markup for the ones that are in db but not present in template.

This would be a separate feature from https://github.com/divio/django-cms/issues/4512.
Reply all
Reply to author
Forward
0 new messages