Forum
Get top level parent title rather than direct parent
Is it possible to get the title of a top level parent rather than a page's direct parent? Eg...
/courses/16-18/art-and-design
...would it be possible to get the page title from Courses rather than 16-18? At the minute I'm using perch_pages_parent_page for Art and Design but pageTitle returns 16-18.
Many thanks
What does this output?
(Apologies for the late reply - busy weekend!) The structure of the site is:
When using the above on the art and design page this gets returned:
Still doesn't seem to include the root parent unfortunately
Ah I've figured it out, I can just use perch_pages_breadcrumbs and get pageTitle from the first item in the array. Guess the weekend off helped in the end, haha
Thanks Drew
OK, great.