summaryrefslogtreecommitdiff
path: root/inc/template.php
diff options
context:
space:
mode:
authorAnika Henke <anika@selfthinker.org>2011-01-02 19:27:46 +0000
committerAnika Henke <anika@selfthinker.org>2011-01-02 19:27:46 +0000
commite013f48d37f8cdd20b7c81cd4dfb24b695354050 (patch)
treef57570bd5d4af7844e8bfbe48a7dfeeedce933ae /inc/template.php
parent5526795c71a703486ddd19bf986e6a0cf7309945 (diff)
downloadrpg-e013f48d37f8cdd20b7c81cd4dfb24b695354050.tar.gz
rpg-e013f48d37f8cdd20b7c81cd4dfb24b695354050.tar.bz2
adjusted tpl_youarehere to use tpl_pagelink (and fixed bugs with missing first headings)
Diffstat (limited to 'inc/template.php')
-rw-r--r--inc/template.php20
1 files changed, 4 insertions, 16 deletions
diff --git a/inc/template.php b/inc/template.php
index 53ae9abce..373e60fde 100644
--- a/inc/template.php
+++ b/inc/template.php
@@ -748,39 +748,27 @@ function tpl_youarehere($sep=' &raquo; '){
echo '<span class="bchead">'.$lang['youarehere'].': </span>';
// always print the startpage
- $title = useHeading('navigation') ? p_get_first_heading($conf['start']) : $conf['start'];
- if(!$title) $title = $conf['start'];
- tpl_link(wl($conf['start']),hsc($title),'title="'.$conf['start'].'"');
+ tpl_pagelink(':'.$conf['start']);
// print intermediate namespace links
$part = '';
for($i=0; $i<$count - 1; $i++){
$part .= $parts[$i].':';
$page = $part;
- resolve_pageid('',$page,$exists);
if ($page == $conf['start']) continue; // Skip startpage
// output
echo $sep;
- if($exists){
- $title = useHeading('navigation') ? p_get_first_heading($page) : $parts[$i];
- tpl_link(wl($page),hsc($title),'title="'.$page.'"');
- }else{
- tpl_link(wl($page),$parts[$i],'title="'.$page.'" class="wikilink2" rel="nofollow"');
- }
+ tpl_pagelink($page);
}
// print current page, skipping start page, skipping for namespace index
+ resolve_pageid('',$page,$exists);
if(isset($page) && $page==$part.$parts[$i]) return;
$page = $part.$parts[$i];
if($page == $conf['start']) return;
echo $sep;
- if(page_exists($page)){
- $title = useHeading('navigation') ? p_get_first_heading($page) : $parts[$i];
- tpl_link(wl($page),hsc($title),'title="'.$page.'"');
- }else{
- tpl_link(wl($page),$parts[$i],'title="'.$page.'" class="wikilink2" rel="nofollow"');
- }
+ tpl_pagelink($page);
return true;
}