-
2009-02-16
furun
Function youarehere() shows the full path in file names, it needs a noNS().
-
2009-02-17
joncl
As a workaround, I set useheading to Never in the Configuration Manager, and then commented the following code at lines 878 and 892 in inc/template.php:
/*$title = useHeading('navigation') ? p_get_first_heading($page) : $page;
if(!$title)*/ $title = $parts[$i];
jc
-
2009-02-25
bci
After migrating a number of DokuWiki-based Wikis from the old stable release (20080505) to the new one (20090214) I can confirm that there is something queer about the youarehere path in the new release.
I am still working on an internal fix for our infrastructure, so far I would suggest changing the function tpl_youarehere() in template.php like the following (+ meaning "line added", - meaning "line removed"):
function tpl_youarehere()
...
// print intermediate namespace links
...
for($i=0; $i<$count - 1; $i++){
..
// output
echo $sep;
if($exists){
$title = useHeading('navigation') ? p_get_first_heading($page) : $page;
+ $linktext = useHeading('navigation') ? p_get_first_heading($page) : $parts[$i];
if(!$title) $title = $parts[$i];
- tpl_link(wl($page),hsc($title),'title="'.$page.'"');
+ tpl_link(wl($page),hsc($linktext),'title="'.$page.'"');
}
...
// print current page, skipping start page, skipping for namespace index
if(isset($page) && $page==$part.$parts[$i]) return;
+ if($count==1) return;
$page = $part.$parts[$i];
if($page == $conf['start']) return;
echo $sep;
if(page_exists($page)){
$title = useHeading('navigation') ? p_get_first_heading($page) : $page;
+ $linktext = useHeading('navigation') ? p_get_first_heading($page) : $parts[$i];
if(!$title) $title = $parts[$i];
- tpl_link(wl($page),hsc($title),'title="'.$page.'"');
+ tpl_link(wl($page),hsc($linktext),'title="'.$page.'"');
}
...
}
bci
-
2009-02-26
furun
There is a little more cleaner way to fix this.
change 2 lines from ...
$title = useHeading('navigation') ? p_get_first_heading($page) : $page;
to
$title = useHeading('navigation') ? p_get_first_heading($page) : noNS($page); //BUGFIX
(this is maybe not necessary, but for perfection)
$title = useHeading('navigation') ? p_get_first_heading($conf['start']) : $conf['start'];
to
$title = useHeading('navigation') ? p_get_first_heading($conf['start']) : noNS($conf['start']); //BUGFIX
-
2009-02-26
bci
Hi furun
It depends on what you're trying to achieve...
I am trying to achieve the following behaviour:
The youarehere path should look as follows (like in the previous release):
Start >> namespace1 >> namespace2 >> pageXY
The title attributes of the anchor-tags should display the following texts upon mouseover:
link to namespace1: namespace1:start
link to namespace2: namespace1:namespace2:start
link to pageXY: namespace1:namespace2:pageXY
That's what my suggestion achieves.
Your solution achieves something else.
According to my tests the above youarehere-path would look as follows using your solution:
Start >> start >> start >> pageXY
Unfortunately, that is not my goal.
Cheers, bci
-
2009-02-26
furun
You are right. I get that resolute you tray to achieve, but i check i again, and i not mark a other patched line and forgot it (updating stress :). Your way uses the namespace name directly and is so the better solution.
$title = useHeading('navigation') ? p_get_first_heading($page) : $page;
to
$title = useHeading('navigation') ? p_get_first_heading($page) : $parts[$i]; //BUGFIX
But i think $linktext is not necessary, because $title is used only on one place, (or you get side effects it you use $title directly?)
(The name $linktext would be less confusing than $title ;)
-
2009-03-13
andi
fixed in devel
-
Related tasks: