toni Posted April 30, 2020 Posted April 30, 2020 Hi, I have persons using template person. I have events linking to persons using a template event. By now on a person detail page I'm looking for events like: $page->references() and in my loop I'm checking if the item has template "event" {if $item->template == "event"} smarty ? Is it possible to do this in one step? ~ ->references('template=event') I must admit I do not really got the idea of $field. Thanks!
adrian Posted April 30, 2020 Posted April 30, 2020 @toni - the docs show (https://processwire.com/api/ref/page/references/) that you can use a selector exactly as you are describing. Did you try to see if it works as you want?
toni Posted April 30, 2020 Author Posted April 30, 2020 hi @adrian. mhhh yep this is what I did so there must be something else wrong ?
toni Posted April 30, 2020 Author Posted April 30, 2020 Dear @adrian sorry for noise. With some rubber duck debugging ... it was a typo. Shame on me ;( 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now