我正在一个小网站上工作,只需要一个简单的CMS来编辑它的内容。所以我从博尔特开始。目前我有5个页面具有不同的标记,如内容结构。有可能这样做吗?因为目前不幸的是它没有工作。
我的contenttypes.yml:
pages:
name: Homepage
singular_name: homepage
fields:
title:
type: text
class: large
group: content
slug:
type: slug
uses: title
header-image:
type: image
title-one:
type: text
header-text:
type: html
title-two:
type: text
text-one:
type: html
body-image-two:
type: image
title-three:
type: text
body-image-text:
type: html
title-four:
type: text
text-two:
type: html
title-five:
type: text
text-three:
type: html
template:
type: templateselect
filter: '*.twig'
taxonomy: [ groups ]
recordsperpage: 100
name: Over ons
singular_name: over-ons
fields:
title:
type: text
class: large
group: content
slug:
type: slug
uses: title
image:
type: image
title-one:
type: text
title-two:
type: text
body:
type: html
height: 300px
template:
type: templateselect
filter: '*.twig'
taxonomy: [ groups ]
recordsperpage: 100
name: Diensten
singular_name: diensten
fields:
title:
type: text
class: large
group: content
slug:
type: slug
uses: title
image:
type: image
title-one:
type: text
intro-text:
type: html
title-two:
type: text
text-two:
type: html
title-three:
type: text
text-three:
type: html
title-four:
type: text
text-four:
type: html
title-five:
type: text
text-five:
type: html
template:
type: templateselect
filter: '*.twig'
taxonomy: [ groups ]
recordsperpage: 100
name: Het proces
singular_name: het-proces
fields:
title:
type: text
class: large
group: content
slug:
type: slug
uses: title
image-one:
type: image
title-one:
type: text
intro-text:
type: html
title-two:
type: text
text-two:
type: html
image-two:
type: image
title-three:
type: text
text-three:
type: html
image-three:
type: image
title-four:
type: text
text-four:
type: html
image-four:
type: image
title-five:
type: text
text-five:
type: html
image-five:
type: image
title-six:
type: text
text-six:
type: html
image-six:
type: image
template:
type: templateselect
filter: '*.twig'
taxonomy: [ groups ]
recordsperpage: 100
name: Projecten
singular_name: projecten
fields:
title:
type: text
class: large
group: content
slug:
type: slug
uses: title
title-one:
type: text
intro-text:
type: html
title-two:
type: text
text-two:
type: html
image-two:
type: image
template:
type: templateselect
filter: '*.twig'
taxonomy: [ groups ]
recordsperpage: 100
name: Contact
singular_name: contact
fields:
title:
type: text
class: large
group: content
slug:
type: slug
uses: title
title-one:
type: text
intro-text:
type: html
template:
type: templateselect
filter: '*.twig'
taxonomy: [ groups ]
recordsperpage: 100
关于解决方案的任何想法?
提前致谢。
答案 0 :(得分:0)
我建议只使用一种内容类型" pagina"#34;为了那个原因。如果您需要使它们多样化,请使用templateselect
(就像您已经做过的那样),并且可能会添加一个"模板字段"或两个。
见这里:https://docs.bolt.cm/2.2/templates/building-templates#template-specific-fields