【问题标题】:include navigation menu out of themes dir包括主题目录之外的导航菜单
【发布时间】:2013-03-07 13:22:27
【问题描述】:

我正在使用这个画廊。

http://www.silverstriperesources.com/modules/silverstripe-3-gallery-plugin-module/

我需要在themes/simple/templates/includes 中包含一个导航菜单文件。

我该怎么做?问题是 ss3Gallery 文件夹(在根目录中)和 GalleryPage.ss 分别不在 themes/simple 中。

所以,GalleryPage.ss <% include NavigationPage %> 中的这段代码将不起作用。

【问题讨论】:

    标签: silverstripe


    【解决方案1】:

    您是否尝试将?flush=all 附加到您的网址?

    如果我没记错的话(至少在 SS 2.x 中),SilverStripe 尝试查找的顺序包括:

    1. 我的站点/模板/包含/
    2. 主题/你的主题/模板/包含/
    3. 你的模块/模板/包含/

    因此您始终可以覆盖包含(或布局)。

    【讨论】:

      【解决方案2】:

      如果 SilverStripe 3 适用于 SilverStripe 2.x 等主题,您应该可以将 /ss3Gallery/templates 文件夹复制到 /themes/simple_ss3Gallery/templates。这些新文件将覆盖扩展目录中的文件。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2014-11-22
        • 2021-08-02
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多