Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

安装twig模板引擎后启动会提示这个 #16

Closed
774649283 opened this issue May 29, 2020 · 3 comments
Closed

安装twig模板引擎后启动会提示这个 #16

774649283 opened this issue May 29, 2020 · 3 comments

Comments

@774649283
Copy link

在config/view.php里面已经配置使用twig了,模板里也能正常使用了,但是会提示如下问题
image

@walkor
Copy link
Owner

walkor commented May 30, 2020

重新更新下代码,这行提示已经删除了

@walkor walkor closed this as completed May 30, 2020
@774649283
Copy link
Author

774649283 commented Jun 23, 2020

@walkor 我发现使用twig时,不能把文件名称改为xxx.html.twig或者xxx.twig,否则就报错显示无法找到模板,编辑器不能高亮显示twig语法。另外我使用
{% include 'footer.html' %}
或者
{% include 'footer' %}
也是无法找到模板。求大佬指教如何修改
报错内容:
image

@walkor
Copy link
Owner

walkor commented Jun 23, 2020

后缀名默认是html,后缀可以在配置文件config/view.php利用 'view_suffix' => 'xxx' 来更改(没有这个key的话请自行创建)。
我对twig并不熟悉,其它的用法包括include用法请参考twig手册

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants