Okay
  Public Ticket #2902044
Using a for-loop in a widget
Closed

Comments

  • David TRappaud started the conversation

    I have a custom field holding an array of post numbers. I would like to display the post titles for all the posts. something like: 

    the {{item.post_list.cf_tag_candidates}} displays all the posts numbers correctly

    {% set candidates = item.post_list.cf_tag_candidates %}

    {% for candidat in candidates %}
          [shortcode value=candidat]
    {% endfor %}

    Where the shortcode simply returns the post title.

    UPDATED - found solution using {% set candidates = item.post_list.cf_tag_candidates|split(',') %}

  •   Max replied privately