如何在每个页面中渲染 django-cms 插件?
我有一个 django-cms 的最新新闻插件。
我想在页脚显示 5 条最新新闻。页脚放置在网站的每个页面上。
如何在每个页面上呈现这个插件?
I have a latest news plugin for django-cms.
I want to show 5 latest news in footer. Footer placed on every page of site.
How can I render this plugin on every page?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有一些模板标签可以帮助您实现您想要做的事情:
应该从层次结构中上面的页面继承其内容,或者您可以从另一个页面呈现占位符,
组合
您也可以进行像通常呈现的 页面“home”中占位符“页脚”的内容,但如果您在当前页面的占位符中放置某些内容,它将呈现此内容!
There are some template tags that should help you achieve what you are trying to do:
should inherit its content from pages above in the hierarchy, or you can render a place holder from another page with
you can also make a combination like
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!