• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

liquid description tag

Explorer ,
Feb 26, 2015 Feb 26, 2015

Copy link to clipboard

Copied

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 (which I don't want to do) the {tag_description} works as expected.

Does anyone know how can I access the description field when using liquid in this way?

TOPICS
Developer

Views

381

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Enthusiast , Feb 26, 2015 Feb 26, 2015

This got me just yesterday. I fixed it by adding Liquid markup (just the {% comment %} tag) to both the webapp\list.html and webapp\detail.html . Seems to be the same issue as the missing image fields:

Votes

Translate

Translate
LEGEND ,
Feb 26, 2015 Feb 26, 2015

Copy link to clipboard

Copied

Because your outside the scope of templates. This is a known issue that will get addressed.

But as a solution for you now..

{module_webapps id="26025" render="collection" filter="all" template="YOURTEMPLATEPATH"}

Rather then one item, the collection will be passed to the template instead and all the information for that object will be available.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 26, 2015 Feb 26, 2015

Copy link to clipboard

Copied

LATEST

Thanks Liam but this was not quite what I was after.  If I understand you correctly your solution would require that I use the template which I do not want to do.  Roberts trick seemed to do the job.

edit:

"If your doing the collection inline as you want to manage it with other data on the page/template - cool"


^ this

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Feb 26, 2015 Feb 26, 2015

Copy link to clipboard

Copied

This got me just yesterday. I fixed it by adding Liquid markup (just the {% comment %} tag) to both the webapp\list.html and webapp\detail.html . Seems to be the same issue as the missing image fields:

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 26, 2015 Feb 26, 2015

Copy link to clipboard

Copied

Not quite Robert.

Covered this with the guys when in Romania. I think this and a number of other bugs are not addressed yet due to the migration process.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 26, 2015 Feb 26, 2015

Copy link to clipboard

Copied

Thats... crazy.

Thanks for the help.  This worked beautifully.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 26, 2015 Feb 26, 2015

Copy link to clipboard

Copied

As a note Tom,

If your doing the collection inline as you want to manage it with other data on the page/template - cool, But if not - To keep it clean render="collection" to template is a better method. Keeps your code organised.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines