开发者

How to render django-cms plugin in every page?

开发者 https://www.devze.com 2023-01-13 19:26 出处:网络
I have a latest news plugin for django-cms. I want to show 5 latest news in footer. Footer placed on eve开发者_如何学JAVAry page of site.

I have a latest news plugin for django-cms.

I want to show 5 latest news in footer. Footer placed on eve开发者_如何学JAVAry page of site.

How can I render this plugin on every page?


There are some template tags that should help you achieve what you are trying to do:

{% placeholder "footer" inherit %}

should inherit its content from pages above in the hierarchy, or you can render a place holder from another page with

{% show_placeholder "footer" "home" %}

you can also make a combination like

   {% placeholder "footer" or %}
   {% show_placeholder "footer" "home" %}
   {% endplaceholder %}

which will normally render the contents of the placeholder "footer" from page "home", but if you place something in the placeholder of the current page it will render this content!

0

精彩评论

暂无评论...
验证码 换一张
取 消