Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法检测放置在占位符内的最后一个(或第一个)插件?
如果是最后一个插件,我想在我的插件模板中添加一个 class="last"。
试试这个:
{% if plugin.last %} 这是当前占位符的最后一个插件 {% endif %}
(plugin.first 也应该工作)