Replies: 1 comment
-
I helped myself in the meantime by buffering the title (respectively the id) using the new antlers engine.
Still curious about a cleaner solution inside a custom tag, controller or the like. Thank you! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello there and sorry – can't even describe what I'm trying to do here. It's my first Statamic project. Love it so far!, but also challenging as I'm quite new to PHP/Laravel world...
Maybe you can hint at the right direction, when I'm explaining the specific challenge: 'm working on a music festival website. Apart from static Pages collection, there is an Artist and Timetable collection. Also there are taxonomies for Stages and Event Type ("Concert", "DJ Set", etc.)
Timetable entries will be e.g. Friday, Saturday and Sunday. The Timetable blueprint has a replicator field
timeslots
with the following fields:This works fine for me when rendering the Timetable in the frontend, but I can't figure out how to display stage times on the Artists pages
views/artists/show.antlers.html
?My first approach was something like this:
Can't get this to work. I guess mainly because
title
returns the timetable entries title, not the artist title. (This is why I triedscope
– no success).Apart from that specific issue, I guess there's a much more elegant way to solve this. Like a custom query that lives in some .php file and can be called from the template like this
{{ stage_times :artist="title" }}
. But I have no idea where to start...Hope somebody can help me with this.
Thanks in advance,
Hans
Beta Was this translation helpful? Give feedback.
All reactions