Skip to content

Commit

Permalink
Update helper.php - remove last 'start' in breadcrump / youarehere
Browse files Browse the repository at this point in the history
Removes last start to avoid confusing youarehere paths when usinh ShortTitle in page meta data
  • Loading branch information
julianze committed Feb 16, 2019
1 parent 17e5266 commit 066fa2b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ function html_youarehere($start_depth = 0) {
}
$name = p_get_metadata($id, 'shorttitle', METADATA_DONT_RENDER) ?: noNS($id0);
}
$items[] = '<bdi>'.$this->html_pagelink($id, $name, $exists).'</bdi>';
if ($i < $depth-1 OR ($i == $depth-1 AND !preg_match('/.*:'.$conf['start'].'$/', $id))) {
$items[] = '<bdi>'.$this->html_pagelink($id, $name, $exists).'</bdi>';
}
}
// join items with a separator
$out = implode(' ›&#x00A0;', $items);
Expand Down

0 comments on commit 066fa2b

Please sign in to comment.