为什么 craftcms 中的 twig 代码无法在本地主机上生成新代码?

发布于 2025-01-11 17:13:48 字数 570 浏览 2 评论 0原文

在 craftCMS 中,我创建了一个字段来加载内容,但是当我更改模板中的代码时,该字段没有显示。我检查了是否使用了正确的文件夹

起初我以为这是缓存,但是当我转到实用程序清除缓存时,仍然会发生相同的错误。此外,当我编写除树枝代码之外的任何新字符时,浏览器会给出新代码的错误,但当我删除它时,它仍然是相同的旧代码

  1. 这是我的代码:
{% extends "index" %} 
{% block content %}
    This is not generate on my local
    <div class="can't load new code below and new class right here"
        {{ entry.headingDescription }}
        {{ entry.headingTitle }}
    </div
{% endblock %}
  1. 我的结构:

1

In craftCMS I've created a field to load content but this field is not showing up when i change my code in the template. I've checked if I used the correct folder

At first i thought it was the cache but when i go to utilities to clear the cache the same error still occurs. Also when I write any new character other than twig code the browser gives an error with the new code but when I delete it, it's still the same old code

  1. Here is my code:
{% extends "index" %} 
{% block content %}
    This is not generate on my local
    <div class="can't load new code below and new class right here"
        {{ entry.headingDescription }}
        {{ entry.headingTitle }}
    </div
{% endblock %}
  1. My structure:

1

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文