Php 是否不路由到contenttype的单个页面?

Php 是否不路由到contenttype的单个页面?,php,bolt-cms,Php,Bolt Cms,在我的contenttypes.yml文件中有一个名为textimonials的contenttype,如下所示: #Testimonials testimonials: name: Testimonials singular_name: Testimonial fields: name: type: text class: large position: type:

在我的
contenttypes.yml
文件中有一个名为textimonials的contenttype,如下所示:

#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
现在,文件说明如下:

每当你的浏览器在Bolt网站上获得一个页面时,它都会使用一个URL 如/entries或/page/lorem ipsum。博尔特知道如何处理像这样的URL 并显示浏览器请求的信息。博尔特 这是通过将URL映射到所谓的路由来实现的。这条路线是 控制器(调用时)从数据库中获取内容, 选择要使用的模板,根据该模板呈现HTML页面 模板和内容,并将其提供给浏览器

同时,如果创建新记录,Bolt将知道 该内容的URL为。因此,当浏览器请求该URL时, 它可以将其映射回正确的内容

例如,如果您有一个“Pages”contenttype,则将“Page”作为 如果名称为单数,您的站点将自动包含以下页面:

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

页面推荐/1未找到

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

模板和路线文档可在中找到


谢谢。

contenttype还有一个
单数\u slug
设置


Bolt尝试自动完成,但您也可以将其配置为您想要的任何内容。

尝试单数名称“推荐”

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

无论你是否有足够的声誉,这都不是发表评论的恰当方式。
http://localhost:8080/boltCMS/Testimonial/1