瀏覽代碼

Include Custom CSS and ID in reusable content blocks. See Issue #275, PR #293 (#319)

Russ Ferriday 4 年之前
父節點
當前提交
de365946bc
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      coderedcms/templates/coderedcms/blocks/reusable_content_block.html

+ 4 - 1
coderedcms/templates/coderedcms/blocks/reusable_content_block.html

@@ -1,2 +1,5 @@
 {% load wagtailcore_tags %}
-{% include_block self.content.content %}
+
+<div {% if self.settings.custom_id %}id="{{self.settings.custom_id}}"{% endif %} class="block-html {{ self.settings.custom_css_class }}">
+  {% include_block self.content %}
+</div>