2

最近我开始使用 Bolt CMS。我用 Angular JS 制作了一个主题,但我想使用一些静态页面。正如他们在他们的文档中提到的那样,https://docs.bolt.cm/3.0/templates/templates-routes#automatic-template-selection我已将链接添加到routing.yml

例子:

oldpages:
  path:           /applications/forms/chakka/ng/templates/core.html
  defaults:       { _controller: 'Bolt\Controllers\Frontend::record', 'contenttypeslug': 'page' }
  requirements:
    slug:       '[a-z0-9-_]+'

但我得到一个

异常 --> Symfony \ Component \ HttpKernel \ Exception \ HttpException

页面页面/未找到。

我真的是螺栓 CMS 的新手。有谁知道为什么?

提前致谢 !

4

1 回答 1

1

我认为您想要的是模板绑定:

templatebinding:
    path: /mytemplate
    defaults: { _controller: 'Bolt\Controllers\Frontend::template', template: 'mytemplate' }
于 2016-06-28T06:19:08.430 回答