cpx3 Posted October 23, 2022 Share Posted October 23, 2022 Hi to all, I have a page reference field (select_categories) that references to a page called "unternehmen". When I debug it, PW says that the of the referenced page is "unternehmen". But when I put the condition, I get false. What am I doing wrong? Link to comment Share on other sites More sharing options...
Jan Romero Posted October 23, 2022 Share Posted October 23, 2022 $page->select_categories is a PageArray (multiple values can be selected), so you can’t compare it to "unternehmen". Try $page->select_categories->has('name=unternehmen'). Link to comment Share on other sites More sharing options...
cpx3 Posted October 23, 2022 Author Share Posted October 23, 2022 @Jan RomeroYou are incredible. Danke! (PS: I like your profile image!) 1 Link to comment Share on other sites More sharing options...
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