简体   繁体   English

我的Concrete5页面类型将仅使用Default.php

[英]My Concrete5 Page Types Will Only Use Default.php

For some reason, my theme will not use any of the .php templates that I have built. 出于某种原因,我的主题将不使用我构建的任何.php模板。 For instance, in my theme file, there is a template called "gridLayout.php" In Page Types I have created a "Grid Layout" page type with handle "gridLayout"—shouldn't that be all I need to do? 例如,在我的主题文件中,有一个名为“ gridLayout.php”的模板。在“页面类型”中,我创建了一个带有“ gridLayout”句柄的“网格布局”页面类型,这不是我要做的全部吗? I cannot see the template in the Defaults mode, or when I create a specific page of that type. 在默认模式下,或者在创建该类型的特定页面时,我看不到模板。 I also tried de-activating and re-activating the theme, thinking that would refresh things; 我还尝试停用和重新激活主题,以为会刷新主题。 still nothing. 依然没有。 I must be missing something simple. 我一定想念一些简单的东西。

页面类型应该遵循concrete5的命名规则,grid_layout.php优先于gridLayout.php,concrete5只会在主题安装或使用“检查”按钮时要求您注册新的页面类型。

There are a couple of options here. 这里有两个选择。 One, de-activating the theme is not enough. 第一,仅停用主题是不够的。 Uninstalling and installing the theme will restart the process of identifying page types. 卸载和安装主题将重新开始识别页面类型的过程。 Even easer though is the "Inspect" button for the custom theme. 不过,更轻松的是自定义主题的“检查”按钮。 It will identify page templates that are not being used and ask you to create said page type. 它将标识未使用的页面模板,并要求您创建所述页面类型。

Check your cache settings in Concrete5. 在Concrete5中检查缓存设置。 Make sure you turn off all caching while developing. 确保在开发时关闭所有缓存。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM