Page 1 of 1

Get hierarchy level of current page?

Posted: Sat Apr 25, 2015 11:54 pm
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?

Re: Get hierarchy level of current page?

Posted: Sun Apr 26, 2015 6:08 am
by Rolf