我在 Craft 中使用 Twig 并嘗試包含我制作的模塊,我已將所有內容添加到 CMS 中的模塊中并保存,它們正確顯示在頁面上,但有大量空段落標簽還顯示,有誰知道這是為什么?我采取的步驟:我有一個名為“Abilities.twig”的樹枝文件,在能力中我有以下代碼:<p>{{ module.Abilities }}</p>在 Index.twig 我有以下內容:{% for module in entry.modals %} {% include '_modals/Abilities' %}{% endfor %}下面是它們如何在頁面上顯示的示例<p>This is the first example of an ability</p><p>This is the second example of an ability</p><p></p><p></p><p></p><p></p><p></p>在 CMS 中,唯一顯示的模塊是前 2 個示例,沒有保存空模塊。如果有人可以幫助將不勝感激
- 2 回答
- 0 關注
- 155 瀏覽
添加回答
舉報
0/150
提交
取消