EE 2.10.1 Playa 4.5.2 Stash 2.6.7
I'm building out a particularly complex single entry page and can't seem to wrap my head around how to approach what needs to be done.
I have a Trips channel with two playa fields Related Outpost and Related Activity. On the individual trip page I need to list all trips that are in the same outpost (reverse relationship) and sort them by Activity.
So Trip A takes place at the Green Outpost. I need to show all trips that also take place at the Green Outpost and then sort/filter like this:
Rafting (activity)
- trip a
- trip b
- trip c
Hiking (activity)
- trip d
- trip e
I know it's not possible to filter/search by a playa field natively, but would this be possible using Stash and if so, where would I start with this?
Currently I have the following, stripped down template, where I suspect that each Activity (Rafting etc) would be an embed
{exp:channel:entries channel="trips"}
{trip_outpost}<h2 class="text-center trip-outpost">{title}</h2>{/trip_outpost}
<h3>Rafting</h3>
<div class="trip">
<h4>Trip Title</h4>
Trip Details Here
</div>
<div class="trip">
<h4>Trip Title</h4>
Trip Details Here
</div>
<div class="trip">
<h4>Trip Title</h4>
Trip Details Here
</div>
<h3>Hiking</h3>
<div class="trip">
<h4>Trip Title</h4>
Trip Details Here
</div>
<div class="trip">
<h4>Trip Title</h4>
Trip Details Here
</div>
{/exp:channel:entries}