Support » Plugin: Pods - Custom Content Types and Fields » Templates – Each loop

  • Resolved dstapler

    (@dstapler)


    Hi,

    I have a field that is using a Relationship field to Calendar – Days of the Week. I call it vp_days_of_the_week.

    in my template, what would I use to get the day to output? This doesn’t work.

    [each vp_days_of_the_week]
      <li>{@day}</li>
    [/each]
Viewing 1 replies (of 1 total)
  • Plugin Author Jim True

    (@jimtrue)

    Unfortunately, you can only get at the ‘value’ of the items in a Simple Custom Defined List, not the ‘label’ as defined in this GitHub issue: https://github.com/pods-framework/pods/issues/3080

    You can get the ‘array’ value of the day of the week by using {@_value} inside the each.

    If you’re okay with just getting the multiple list (ie Monday, Wednesday, and Friday), you can just output {@vp_days_of_the_week}.

    As a workaround, you can create another post type for ‘days-of-the-week’ with the Monday-Sunday as the post-title and use that as a relationship instead.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.