techdivision/notfound

此包已被放弃,不再维护。未建议替代包。

为 Neos CMS 提供可配置的 404 错误。此包包含内容尺寸支持!

2.0.1 2016-03-12 14:29 UTC

This package is auto-updated.

Last update: 2022-08-28 20:00:58 UTC


README

此包为 TYPO3 Neos 提供一个可配置的 404 错误页面,支持尺寸。

安装

对于 Neos 1.2.*,请将以下包添加到您的 composer.json

{
    "require": {
        "techdivision/notfound": "1.0.*"
    },
}

对于 Neos 2.0.*,请使用

{
    "require": {
        "techdivision/notfound": "2.0.*"
    },
}

安装此包

composer update techdivision/notfound

配置

为了启用此包,您需要在您的站点或项目设置.yaml中设置以下设置

TechDivision:
  NotFound:
    enable: true
    defaultUriSegment: '404'

enable: 启用或禁用模块 defaultUriSegment: 您 404 站点的节点路径 uri 段

可选

如果您使用 defaultUriSuffix(大多数情况下为 .html),您需要在您的 Routes.yaml 的 末尾 添加一个额外的路由

##
# TechDivision.NotFound Subroutes - only required if the 'TYPO3 Neos' route has a 'defaultUriSuffix' suffix
##
-
  name: 'TechDivision.NotFound'
  uriPattern: '<TechDivisionNotFoundSubroutes>'
  subRoutes:
    'TechDivisionNotFoundSubroutes':
      package: 'TechDivision.NotFound'