我有一个容器,例如: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 }}
但对于get
或query
,我得到的是列表,而不是容器。。。
知道吗?
谢谢
当然,您必须首先访问record
属性:
{{ site.get('/students').record.description }}
并且您始终可以访问子级的.parent
属性。