FuturShoc Posted January 31, 2013 Posted January 31, 2013 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.
FuturShoc Posted January 31, 2013 Author Posted January 31, 2013 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. ;-)
ryan Posted February 1, 2013 Posted February 1, 2013 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. 1
Soma Posted February 1, 2013 Posted February 1, 2013 Yeah and you can make them look the way you want. Of course for the female users, they're all male. 1
diogo Posted February 1, 2013 Posted February 1, 2013 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? 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