I'm building a music site, which has individual pages for each artist, and under that, subpages for photos, videos and discography of the artist. Basically on all these pages, I want to display the artist name within the header. The main artist page's label is that artist name, so in the template for those pages, I've simply included echo $page->label; .
For its subpages, I've created a different template where I'm trying to put the parent page label in the header, with a link back to the parent page. I found the code here: http://gpeasy.com/Forum?show=t876 works well, but I am not experienced with this at all so don't understand it enough to adapt it.
I have found that echo common::Link($parent_title,$parent_title); gives me the link I want, but of course displays 'Artist_Name' instead of 'Artist Name' and echo common::GetLabel($parent_title); displays the page label ('Artist Name') but of course isn't linked as I'd like. I can't work out how to combine them to get the result I want. Any help would be much appreciated.
Please let me know if any of this doesn't make sense and needs clarifying - I really don't know what I'm doing and as such, don't know if I am even making my needs clear.
Thank you! Both work perfectly.
I also tried the latter by itself, as I wasn't sure exactly how much of a shortcut it was. It worked, except it linked to the site's very top page - Home. Is there any shorter way to get it to find the parent directly above it? Or is the code from the thread I linked to all necessary to include? My understanding from that thread is that it inspects the menu and determines the page's direct parent.