[Fixed]-Django CMS template inheriting from ancestor not recognizing placeholder


The placeholder tag has to be used on pages directly tied to CMS pages. If your template is rendered via a django app, you need to use static_placeholder.

A static_placeholder can also be used to re-use the same content between templates e.g. a footer.

Docs on static placeholders in terms of their use within CMS pages and not external apps; http://django-cms.readthedocs.org/en/latest/how_to/templates.html#static-placeholder

Also, if you’ve not explored this, then take a look at the docs around placeholders in your apps. http://django-cms.readthedocs.org/en/latest/how_to/placeholders.html

Using a PlaceholderField in your apps can lead to some cool app hooks which can take all your CMS plugins. Specifically I’ve made a news app with those that allows you to add/edit content via the toolbar, then have a ListView page for all the objects which renders out the placeholder fields in the corresponding DetailView.

Leave a comment