Jump to content

Recommended Posts

Posted

Can someone suggest a way to get the *level* of a page in the hierarchy?

I need to do something different on a page template, IF the page exists at the third level of the page hierarchy.

I was hoping for some kind of $page->level() method I could call, but that doesn't seem to exist.

Posted

Aha! That seems to give us what we need. Thanks, Ryan.

Off the cuff, I wouldn't have expected that to work since I see "parents" as however many siblings exist above the current level.

But, clearly, the parent/child model doesn't work *quite* like genetics. ;-)

Posted
Off the cuff, I wouldn't have expected that to work since I see "parents" as however many siblings exist above the current level.

But, clearly, the parent/child model doesn't work *quite* like genetics. ;-)

A page does not need to have two parents of the same generation like we do. In the case of ProcessWire, all pages are female. 

  • Like 1
Posted

Yeah and you can make them look the way you want. Of course for the female users, they're all male.

  • Like 1
Posted
In the case of ProcessWire, all pages are female.
Yeah and you can make them look the way you want

Is anyone else noticing something wrong with these two statements?

  • Like 1

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...