凡`contenttypes.generic.recent`从record.twig来?

问题描述 投票:0回答:1

我只是通过代码螺栓CMS默认主题以下行去。

{% for ct in app.config.get('contenttypes') if not ct.viewless|default(false) %}

            {% setcontent records = ct.slug ~ "/latest/3" %}

            <h5>{{ __('contenttypes.generic.recent', {'%contenttypes%': ct.slug}) }}</h5>
            <ul>
                {% for record in records %}
                    <li><a href="{{ record.link }}">{{ record.title }}</a></li>
                {% else %}
                    <li>{{ __('contenttypes.generic.no-recent', {'%contenttype%': ct.slug}) }}</li>
                {% endfor %}
            </ul>
            <p><a href="{{ paths.root }}{{ct.slug}}">{{ __('contenttypes.generic.overview',{'%contenttypes%': ct.slug}) }} &raquo;</a></p>

        {% endfor %}

现在,下面的一行代码:

        <h5>{{ __('contenttypes.generic.recent', {'%contenttypes%': ct.slug}) }}</h5>

生成前端follownng文字:

Recent Pages

Recent Entries

Recent Showcases

但究竟其中contenttypes.generic.recent来自哪里?

bolt-cms
1个回答
0
投票

\供应商\螺栓\螺栓\程序\资源\翻译\ EN_GB \ messages.en_GB.yml

在该文件中有一个条目

contenttypes.generic.recent: "Recent %contenttypes%"
© www.soinside.com 2019 - 2024. All rights reserved.