kaz Posted October 2 Posted October 2 I couldn't find anything suitable in the API. I'm looking for a way to number breadcrumbs with numbered itemprop='position' content='x'. Home = 1, and so on. Is there a way to number the order of visible pages of the pages of the breadcrumbs (content='number')? <meta itemprop='position' content='2' />
virtualgadjo Posted October 2 Posted October 2 Hi, well actually, as when displaying breadcrums i use <?php foreach($page->parents() as $parent): ?> i think that while looping through the parents array, something like <?php foreach($page->parents() as $pid => $parent) { $position = $pid + 1; //except if you want your position starting by 0 } ?> would do the job $pid being different from $parent->id of course hope it may help 🙂 have a nice day 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