]> sipb.mit.edu Git - ikiwiki.git/blobdiff - doc/todo/Add_space_before_slash_in_parent_links.mdwn
how to achieve this by modifying your templates
[ikiwiki.git] / doc / todo / Add_space_before_slash_in_parent_links.mdwn
index c4dc6ede6b7724e2db86a4e4b3534492e30c3173..79044ccc66f8ac44efab6cf485929c02a674f1f7 100644 (file)
@@ -1,4 +1,17 @@
-This patch adds a space before the forward-slash in the the parent links. There is already a space after the slash.
+This [[patch]] adds a space before the forward-slash in the the parent links. There is already a space after the slash.
+
+> I intentionally put the space after the slash and not before, because I
+> like how it looks that way. So I don't plan to apply this patch unless a
+> lot of people disagree with me or whatever. --[[Joey]]
+
+>> Couldn't we export what's put between the links to a variable? For instance, I might actually want to set it to ' : ' or '→'. --[[madduck]]
+
+>>> Yes, please.  This seems to be something a lot of people want to customize.  (I certainly do -- a forward slash only looks natural to Unix users)  --[[sabr]]
+
+>> Joey, would I be right to summarize your position on this as "people who
+>> want to change the text of the templates should maintain their own version
+>> of the `.tmpl` files"? It's not clear to me how this todo item could be
+>> closed in a way acceptable to you, except perhaps as WONTFIX. --[[smcv]]
 
 Before:
 
@@ -11,40 +24,51 @@ After:
 Patch:
 
     diff --git a/templates/misc.tmpl b/templates/misc.tmpl
-    index 80e6d0b..184920e 100644
+    index 184920e..80e6d0b 100644
     --- a/templates/misc.tmpl
     +++ b/templates/misc.tmpl
     @@ -15,7 +15,7 @@
 
      <div class="header">
      <span>
-    -<TMPL_VAR INDEXLINK> / <TMPL_VAR TITLE>
-    +<TMPL_VAR INDEXLINK>/ <TMPL_VAR TITLE>
+    -<TMPL_VAR INDEXLINK>/ <TMPL_VAR TITLE>
+    +<TMPL_VAR INDEXLINK> / <TMPL_VAR TITLE>
      </span>
      </div>
 
     diff --git a/templates/page.tmpl b/templates/page.tmpl
-    index 1978e93..3a1ac9e 100644
+    index 3a1ac9e..1978e93 100644
     --- a/templates/page.tmpl
     +++ b/templates/page.tmpl
     @@ -17,7 +17,7 @@
      <div class="header">
      <span>
      <TMPL_LOOP NAME="PARENTLINKS">
-    -<a href="<TMPL_VAR NAME=URL>"><TMPL_VAR NAME=PAGE></a> /
-    +<a href="<TMPL_VAR NAME=URL>"><TMPL_VAR NAME=PAGE></a>/
+    -<a href="<TMPL_VAR NAME=URL>"><TMPL_VAR NAME=PAGE></a>/
+    +<a href="<TMPL_VAR NAME=URL>"><TMPL_VAR NAME=PAGE></a> /
      </TMPL_LOOP>
      <TMPL_VAR TITLE>
      </span>
     diff --git a/templates/recentchanges.tmpl b/templates/recentchanges.tmpl
-    index 4877395..e03482f 100644
+    index e03482f..4877395 100644
     --- a/templates/recentchanges.tmpl
     +++ b/templates/recentchanges.tmpl
     @@ -15,7 +15,7 @@
 
      <div class="header">
      <span>
-    -<TMPL_VAR INDEXLINK> / <TMPL_VAR TITLE>
-    +<TMPL_VAR INDEXLINK>/ <TMPL_VAR TITLE>
+    -<TMPL_VAR INDEXLINK>/ <TMPL_VAR TITLE>
+    +<TMPL_VAR INDEXLINK> / <TMPL_VAR TITLE>
      </span>
      </div>
+
+----
+
+It's almost implicit in some of the discussion above but this can be achieved locally if you fork your templates directory from ikiwiki's, with an ammendment such as
+
+    <h1><TMPL_LOOP NAME="PARENTLINKS"><a
+        href="<TMPL_VAR NAME=URL>"><TMPL_VAR NAME=PAGE></a>
+        &rarr;
+        </TMPL_LOOP><TMPL_VAR TITLE></h1>
+
+This is what I do on my site for example. -- [[Jon]]