perch:related data NOT available? in slug, variable and item list columns

  • Hi all, Can anyone help?

    I have a Collection for Jobs and another for Locations, I'm using perch:related for the Locations so that this can be added to rather than just providing a select field.

    Code
    1. <p><strong>Location:</strong><br>
    2. <perch:related id="location" collection="Locations" label="Job Locations">
    3. <perch:content id="jobLocation" title>
    4. </perch:related>
    5. </p>


    Locations template used:

    Code
    1. <perch:content id="jobLocation" type="text" label="Location" required title>

    I can add content to both and display both on the page but I can't reuse jobLocation id to generate the slug it just doesn't output it.

    Code
    1. <!--* Build the url slug *-->
    2. <perch:content id="jobSlug" type="slug" for="jobTitle jobLocation jobReference" suppress>

    As a test, I've created two fields one using perch:related and one NOT inside a perch:related tag content added directly within the Jobs collection, you can see below that the related one doesn't display in the collection item list:

    What am I doing wrong? I also want to use the Locations field to be set as a variable which is passed into an application form. All of the below code works fine until I change Locations to use a perch:related tag and collection, any idea please?


    List and detail… detail page template below:

    This is the part of the code for job listing filtered by jobLocation, which now needs to come from the perch:related field:

  • Gareth S

    Approved the thread.
  • monkeyboy

    Changed the title of the thread from “perch:related data available for slug, variable and item list columns” to “perch:related data NOT available? in slug, variable and item list columns”.