Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jsp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Templates Silverstripe 3.1模块和模板_Templates_Module_Silverstripe - Fatal编程技术网

Templates Silverstripe 3.1模块和模板

Templates Silverstripe 3.1模块和模板,templates,module,silverstripe,Templates,Module,Silverstripe,我正在Silverstripe中创建一个新模块,该模块是根目录中的一个文件夹。 如。 模块名为公文包,所以目录结构如下- /portfolio /portfolio/code /portfolio/templates 当我创建一个像PortfolioHolderPage.php这样的扩展页面时,它会使用PortfolioHolderPage.ss模板文件呈现页面,但仅此而已,它不包括默认主题中的page.ss文件,有什么想法吗?在创建模块时,如果仍希望page.ss包含在模板中,请不要忘记文件

我正在Silverstripe中创建一个新模块,该模块是根目录中的一个文件夹。 如。 模块名为公文包,所以目录结构如下-

/portfolio
/portfolio/code
/portfolio/templates

当我创建一个像PortfolioHolderPage.php这样的扩展页面时,它会使用PortfolioHolderPage.ss模板文件呈现页面,但仅此而已,它不包括默认主题中的page.ss文件,有什么想法吗?

在创建模块时,如果仍希望page.ss包含在模板中,请不要忘记文件夹布局

/portfolio
/portfolio/code
/portfolio/templates
/portfolio/templates/Layout
也可以将模板放入/themes/yourtheme\u公文包/yourtheme是主题的名称,请参阅
themes/yourtheme\u forum/folder。

silverstripe模块必须有一个_config目录或一个_config.php文件才能识别


请参见

PortfolioHolderPage控制器是否扩展了Page\u控制器?在Page.ss中是否有$Layout?如果是这样,PortfolioHolderPage.ss应该在/portfolio/templates/LayoutYes中,就是这样。我没有把它放在/portfolio/templates/Layout文件夹中,所以它没有包含page.ss谢谢