Using variable in Collection

  • I am trying to work out the best way to structure this page. It is the 'detail' part of a list-detail setup using Collections. The issue is I am constructing a variable based on data from the collection item, and need to then show that as part of the template. This is what I have so far:


    So in the template vacancies/vacancy_single I want to use the $posted variable (e.g. <perch:content id="posted">), but of course I can't because it is being set after the perch_collection. There is probably a simple solution to this but I can't see it! Thanks for any help.


    Mike

  • MikeHarrison

    Changed the title of the thread from “Passing variable in Collection” to “Using variable in Collection”.
  • drewm

    Approved the thread.
  • Ah yes - hadn't thought of that. Thanks for the pointer Drew.

    For those that come after, this is what I did in addons/templates/filters.php :