Jump to content

Recommended Posts

Posted

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?

1525773385_Bildschirmfoto2022-10-23um23_17_32.thumb.png.04e632074b97f13ca0822d541b40702d.png1455826700_Bildschirmfoto2022-10-23um23_17_08.thumb.png.bf7409453b9b2de15ea5f4752983af6a.png

Posted

$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').

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...