I am using liquid to cycle through all the items of a webapp and output the various fields. This works fine but for some reason I cannot output the description field.
The following code is a simplified version of what I am using:
{module_webapps id="26025" collection="tutors" filter="all" template=""}
{% for tutor in tutors.items %}
{{tutor}}
{{tutor.name}}
{{tutor.description}}
{{tutor.["external website"]}}
{% endfor -%}
The {{tutor}}
tag outputs an array of all the fields for the current web app item except the description, so I guess it is unsurprising that {{tutor.description}}
also does not work. Why is this?
When using the template layout (which I don't want to do) {tag_description}
and {{description}} work as expected.
Does anyone know how can I access the description field when using liquid in this way outside of a template layout?
There's currently an issue with the description
field and fields of type Image
- they aren't made available for use unless there is some Liquid markup in the standard list template file (at /Layouts/Webapps/WEBAPPNAME/list.html
).
Adding a comment such as this should resolve it:
{% comment %} This is to get the description and image fields to work {% endcomment %}
This issue is being discussed on the official Adobe Business Catalyst forums: https://forums.adobe.com/ideas/4133