Templates Silverstripe 4.2.1现场don';无法检测公共命名空间模板
我的本地服务器上的一切都正常工作,但当我将网站联机时,一切都正常工作,除了未检测到通过$Layout命名的模板,因此只有2个main Page.ss页面的内容可见 你知道我怎么解决吗 我当然尝试过开发/构建,flush=1,flush=all等,但没有任何效果 以下是我的构建结构:Templates Silverstripe 4.2.1现场don';无法检测公共命名空间模板,templates,namespaces,themes,silverstripe,silverstripe-4,Templates,Namespaces,Themes,Silverstripe,Silverstripe 4,我的本地服务器上的一切都正常工作,但当我将网站联机时,一切都正常工作,除了未检测到通过$Layout命名的模板,因此只有2个main Page.ss页面的内容可见 你知道我怎么解决吗 我当然尝试过开发/构建,flush=1,flush=all等,但没有任何效果 以下是我的构建结构: app _config **app.yml** **theme.yml** src **HomePage.php** tem
app
_config
**app.yml**
**theme.yml**
src
**HomePage.php**
templates
**Page.ss**
Include
Layout
**Page.ss**
Silverstripe
fefracaf
Layout
**HomePage.ss**
我的命名空间是:
名称空间SilverStripe\fefracaf强>
mysite/app/src/HomePage.php
<?php
namespace SilverStripe\fefracaf;
use Page;
class HomePage extends Page
{
}
mysite/app/_config/theme.yml
---
Name: fefracaf
---
SilverStripe\Core\Manifest\ModuleManifest:
project: app
---
Name: mytheme
---
SilverStripe\View\SSViewer:
themes:
- '$public'
- '$default'
提前感谢您的帮助可能是您的文件夹名:
Silverstripe
。您的PHP名称空间是SilverStripe
——请注意,Linux系统区分大小写,而MacOS等本地环境则不区分大小写。@Grafka您还应该避免在自己的类上使用SilverStripe作为名称空间。您可以为顶级ns使用自己的组织名称。问题解决了,这确实是因为名称空间中的文件夹名称“Silverstripe”。谢谢你的帮助!