diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-08-21 22:45:17 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-08-21 22:45:17 +0000 |
commit | d0295d9dc0827cc272f93f20bae2eff783a8fabe (patch) | |
tree | 9ca1fbb59fe6e468663f03b7d63a58797f001b1f | |
parent | cf3021ef3f5cb839195585d601de76df519da510 (diff) | |
download | ikiwiki-d0295d9dc0827cc272f93f20bae2eff783a8fabe.tar ikiwiki-d0295d9dc0827cc272f93f20bae2eff783a8fabe.tar.gz |
* Clean up behavior with broken parentlinks.
-rw-r--r-- | IkiWiki/Render.pm | 2 | ||||
-rw-r--r-- | debian/changelog | 3 | ||||
-rw-r--r-- | doc/bugs/broken_parentlinks.mdwn | 2 | ||||
-rw-r--r-- | templates/page.tmpl | 4 |
4 files changed, 9 insertions, 2 deletions
diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index ddd146922..c3736ecb1 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -74,7 +74,7 @@ sub parentlinks ($) { #{{{ foreach my $dir (reverse split("/", $page)) { if (! $skip) { $path.="../"; - unshift @ret, { url => $path.htmlpage($dir), page => pagetitle($dir) }; + unshift @ret, { url => exists $pagesources{$dir} ? $path.htmlpage($dir) : "", page => pagetitle($dir) }; } else { $skip=0; diff --git a/debian/changelog b/debian/changelog index 323dcf6b2..aaf39d23d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,8 +6,9 @@ ikiwiki (1.22) UNRELEASED; urgency=low STYLEURL and add BASEURL to all templates (some already had it). This new more general variable can be used to link to other things (eg, images) from the template, as well as stylesheets. + * Clean up behavior with broken parentlinks. - -- Joey Hess <joeyh@debian.org> Mon, 21 Aug 2006 18:16:09 -0400 + -- Joey Hess <joeyh@debian.org> Mon, 21 Aug 2006 18:26:28 -0400 ikiwiki (1.21) unstable; urgency=low diff --git a/doc/bugs/broken_parentlinks.mdwn b/doc/bugs/broken_parentlinks.mdwn index dc3294677..359f026ba 100644 --- a/doc/bugs/broken_parentlinks.mdwn +++ b/doc/bugs/broken_parentlinks.mdwn @@ -5,3 +5,5 @@ that superpages weren't mandatory. For example, if you are in 'example/page.html', the header will be something like 'wiki / example / page'. Now, if 'example.html' doesn't exist, you'll have a dead link for every subpage. + +[[todo/done]] diff --git a/templates/page.tmpl b/templates/page.tmpl index 438fbc25d..21746f332 100644 --- a/templates/page.tmpl +++ b/templates/page.tmpl @@ -14,7 +14,11 @@ <div class="header"> <span> <TMPL_LOOP NAME="PARENTLINKS"> +<TMPL_IF NAME="URL"> <a href="<TMPL_VAR NAME=URL>"><TMPL_VAR NAME=PAGE></a>/ +<TMPL_ELSE> +<TMPL_VAR NAME=PAGE>/ +</TMPL_IF> </TMPL_LOOP> <TMPL_VAR TITLE> </span> |