首页
\
问答
\
什么是bolt中的`record.introduction`和`record.teaser`?(What is `record.introduction` and `record.teaser` in bolt ?)
什么是bolt中的`record.introduction`和`record.teaser`?(What is `record.introduction` and `record.teaser` in bolt ?)
我刚刚浏览了listing.twig文件并遇到了以下几行代码:
<h2><a href="{{ record.link }}">{{ record.title }}</a></h2> {% if record.introduction %} {{ record.introduction }} {% elseif record.teaser %} {{ record.teaser }} {% else %} <p>{{ record.excerpt(300, false, search|default('')) }}</p> {% endif %}
现在究竟什么是
record.introduction
和record.teaser
? 我理解最后的else
部分,但我不太明白if
和elseif
部分。 有人可以解释什么record.introduction
和record.teaser
确实是什么?I was just going through the listings.twig file and came across the following lines of code:
<h2><a href="{{ record.link }}">{{ record.title }}</a></h2> {% if record.introduction %} {{ record.introduction }} {% elseif record.teaser %} {{ record.teaser }} {% else %} <p>{{ record.excerpt(300, false, search|default('')) }}</p> {% endif %}
Now what exactly is
record.introduction
andrecord.teaser
? I understand the lastelse
part , but i don't quite understand theif
andelseif
part. Can somebody explain whatrecord.introduction
andrecord.teaser
really is ?
原文:https://stackoverflow.com/questions/40057687
更新时间:2021-09-23 18:09