【发布时间】:2015-05-21 01:58:21
【问题描述】:
我希望您能在两点上提供帮助:
首先,我正在创建一些默认页面的模板,例如: “Home.html、work-with-us.html”等
我的目标是简化网站负责人的工作。他们不必学习如何管理占位符内的插件。
因此,我创建了一些这样的占位符,例如“workwithus.html”:
{% extends "base.html" %}
{% load cms_tags staticfiles sekizai_tags menu_tags %}
{% block content %}
<div class="container">
<div class="col-xs-12">
{% placeholder "image-full" %}
</div>
<div class="col-md-12">
{% placeholder "text-platform" %}
</div>
</div>
{% endblock content %}
我以这种方式管理插件:
CMS_PLACEHOLDER_CONF = {
'image-full': {
'plugins': ['FilerImagePlugin'],
'name': gettext("Image full page"),
'default_plugins': [
{
'plugin_type': 'FilerImagePlugin',
'values': {
},
},
],
'limits': {
'global': 1,
'FilerImagePlugin': 1,
},
},
等
问题是,我不能在同一个模板中多次使用同一个占位符。如果当我制作一个占位符“img-full-width”时,我可以多次调用它,那就太好了。 你有什么想法吗?一种比创建“img-full-2”、“img-full-3”等更合适的方法。
第二个问题: 是否可以添加多个 default_plugins ?真的很烦我……
非常感谢你们!
【问题讨论】:
标签: django django-templates django-cms