0

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?

Tims
  • 1,987
  • 14
  • 16

1 Answers1

1

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

Robert K. Bell
  • 9,350
  • 2
  • 35
  • 50
  • Great, thanks! It is important to note that this fixes the issue even when using in-line collections (as I am here) which do not even reference the default templates. *Crazy* bug. – Tims Feb 28 '15 at 22:48