dplbf4340 2018-05-28 10:05
浏览 32
已采纳

SilverStripe 4自定义错误页面未显示

In my last project on SS 4, I'm trying to create my usual custom error pages - with same approach used on v. 3:

  • Creating ErrorPage.ss inside /themes/mysite/templates/Layout;
  • Including $Content inside template;

After a successful /dev/build?flush=all I don't see any content, neither right template (I see the default Page.ss one instead).

In back-end there are error pages saved and published. In /assets/ there are the static ones too.

Maybe the procedure is changed in this new version? Any advice?

Thanks in advance everyone.

  • 写回答

1条回答 默认 最新

  • drap5081683 2018-05-29 01:52
    关注

    Your ErrorPage.ss folder structure needs to match the core PHP class's namespace (SilverStripe\ErrorPage\ErrorPage), i.e. themes/mytheme/templates/SilverStripe/ErrorPage/Layout/ErrorPage.ss

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

    报告相同问题?

    悬赏问题

    • ¥15 在工控机(Ubuntu系统)上外接USB蓝牙硬件进行蓝牙通信
    • ¥15 关于PROCEDURE和FUNCTION的问题
    • ¥100 webapi的部署(标签-服务器)
    • ¥20 怎么加快手机软件内部计时的时间(关键词-日期时间)
    • ¥15 C语言除0问题的检测方法
    • ¥15 为什么四分管的内径有的是16mm有的15mm,四分不应该是12.7mm吗
    • ¥15 macos13下 ios交叉编译的问题
    • ¥15 bgz压缩文件怎么打开
    • ¥15 封装dll(引入了pcl的点云设计库)
    • ¥30 关于#开发语言#的问题:我需要在抄板的基础上再抄板抄程序,根据RDA8851CM基础上开发