Get hierarchy level of current page?

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
Cerulean
Forum Members
Forum Members
Posts: 172
Joined: Mon Nov 01, 2010 8:56 am

Get hierarchy level of current page?

Post by Cerulean »

Hi folks,

Can anyone tell me how to get the hierarchy level of the current page? In other words: how many parents the current page has.

Thanks.

Edit:

Code: Select all

{$position|substr_count:'.'}
I came up with this but it's a bit of a cludge. Is there a better way?
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Get hierarchy level of current page?

Post by Rolf »

- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
Post Reply

Return to “CMSMS Core”