螺栓 CMS 不路由到内容类型的单个页面?

bolt CMS not routing to singular page of contenttype?

我的 contenttypes.yml 文件中有一个名为 textimonials 的内容类型,如下所示:

#Testimonials
testimonials:
    name: Testimonials
    singular_name: Testimonial
    fields:
        name:
            type: text
            class: large
        position:
            type: text
        body:
            type: textarea
            height: 150px
    listing_template: testimonials.twig
    record_template: testimonial.twig

现在文档说了以下内容:

Whenever your browser gets a page on a Bolt website, it uses an URL like /entries or /page/lorem-ipsum. Bolt knows how to handle URLs like these, and displays the information the browser requested. Bolt does this by mapping the URL to a so-called Route. This Route is the controller that (when called) fetches the content from the database, selects the template to use, renders the HTML page according to that template and the content and serves it to the browser.

At the same time, if you create a new record, Bolt will know what the URL for that content is. So when that URL is requested by a browser, it can map it back to the correct content.

For example, if you have a ‘Pages’ contenttype, with ‘Page’ as a singular_name, your site will automatically have pages like:

http://example.org/pages
http://example.org/page/lorem-ipsum-dolor

好吧,我在 localhost 上安装了 bolt,所以现在当我导航到 http://localhost:8080/boltCMS/testimonials 时,我看到我的 testimonials.twig ,但是当我导航到 http://localhost:8080/boltCMS/testimonials/1 时,我得到一个错误:

Page testimonials/1 not found.

为什么?我的数据库已填充,为什么会出现此错误?

可以找到模板和路由文档 HERE.

谢谢。

还有一个 singular_slug 内容类型设置。

Bolt 尝试自动计算,但您也可以将其配置为任何您想要的。

尝试 singular_name 'Testimonial'。

http://localhost:8080/boltCMS/Testimonial/1