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

  • Resolved dstapler



    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]
Viewing 1 replies (of 1 total)
  • Plugin Author Jim True


    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:

    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)
  • The topic ‘Templates – Each loop’ is closed to new replies.