读取集合的容器的字段



我有一个容器,例如:students。{title,description,children=student}和student={title,…}

# students.ini
[model]
name = Students
[fields.title]
label = Title
type = string
[fields.description]
label = Description
type = markdown
[children]
model = student
# student.ini
[model]
name = Student
[fields.title]
label = Title
type = string

我想得到studentS容器的标题/描述。

{% set root = site.get('/students') %}
{{ root.description }}

但对于getquery,我得到的是列表,而不是容器。。。

知道吗?

谢谢

当然,您必须首先访问record属性:

{{ site.get('/students').record.description }}

并且您始终可以访问子级的.parent属性。

最新更新