]> sipb.mit.edu Git - ikiwiki.git/commitdiff
* Clean up behavior with broken parentlinks.
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Mon, 21 Aug 2006 22:45:17 +0000 (22:45 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Mon, 21 Aug 2006 22:45:17 +0000 (22:45 +0000)
IkiWiki/Render.pm
debian/changelog
doc/bugs/broken_parentlinks.mdwn
templates/page.tmpl

index ddd14692230a749b0cee57b6396279e4f236e9bd..c3736ecb1bac0c98b3c88ed47747352a1e775329 100644 (file)
@@ -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;
index 323dcf6b27f41bd1ba4d4ae5ffec069795a95c0f..aaf39d23d362be16f8665e82956af3fedbfc2547 100644 (file)
@@ -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
 
index dc329467787f1046eed8588a1936fdac5f87a584..359f026ba55c028b1fa538234cffead4654c8a78 100644 (file)
@@ -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]]
index 438fbc25d04bbcb63c12f13c59885912ebe5acf0..21746f332ced365710392fad810d13488a3c8cbf 100644 (file)
 <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>