【问题标题】:How do I override the notFound template?如何覆盖 notFound 模板?
【发布时间】:2017-09-03 07:38:13
【问题描述】:

我发现覆盖 outerLayout 和 templateError 核心模板非常容易,但是如何自定义各个错误页面(404、500 等)?我尝试了一些不同的命名选项,在 /lib/modules/apostrophe-pages/views/pages 和 /lib/modules/apostrophe-templates/views 中创建文件,但是每当我遇到错误的 URL 时,我仍然会得到控制台返回错误(在本地运行):

Error: template not found: notFound.html

【问题讨论】:

  • 找到它:需要在这里:/lib/modules/apostrophe-pages/views/notFound.html 猜这是我没有尝试过的一个位置。

标签: apostrophe-cms


【解决方案1】:

Apostrophe HOWTO 中有一些文档:http://apostrophecms.org/docs/tutorials/howtos/notFoundPage.html

【讨论】:

    猜你喜欢
    • 2023-01-26
    • 2011-07-08
    • 2014-05-22
    • 1970-01-01
    • 1970-01-01
    • 2018-12-16
    • 2018-02-20
    • 1970-01-01
    • 2018-06-02
    相关资源
    最近更新 更多