Topic Closed
9 Posts

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: 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.

Edited: 6 years ago#6680

Josh S.
2K Posts
16 Themes
18 Plugins

How about this:

$label = common::GetLabel($parent_title);

echo common::Link($parent_title,$label);

or there's actually a shortcut function that does this:

echo common::Link_Page($parent_title);

6 years ago#6681

9 Posts

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.

6 years ago#6683

Topic Closed



elFinder 2.1.50 in Upcoming Release

A new release for Typesetter is in the works with a lot of improvements including the ... Read More

Typesetter 5.1

Typesetter 5.1 is now available for download. 5.1 includes bug fixes, UI/UX improvements, ... Read More

More News


Company located in T├│rshavn, Faroe Islands. * Webpage Design * Consultant & Provider of a wide range of programs for visually impaired and dyslextics.

Find out more about our Provider Spotlight

Log In