Code: Select all
{% 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}) }} »</a></p>
{% endfor %}http://imgur.com/a/6eDfN
Now what i want is only recent entries, so i tried modifying the following line of code:
Code: Select all
{% for ct in app.config.get('contenttypes') if not ct.viewless|default(false) %}{% for ct in app.config.get('contenttypes') if not ct.viewless|default(false) and app.config.get('contenttypes') == "entries" %}
But i get an error , so how exactly do i modify the following line of code:
Code: Select all
{% for ct in app.config.get('contenttypes') if not ct.viewless|default(false) %}Thank you.
Gautam.