1 This [[patch]] adds a space before the forward-slash in the the parent links. There is already a space after the slash.
3 > I intentionally put the space after the slash and not before, because I
4 > like how it looks that way. So I don't plan to apply this patch unless a
5 > lot of people disagree with me or whatever. --[[Joey]]
7 >> 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]]
9 >>> 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]]
11 >> Joey, would I be right to summarize your position on this as "people who
12 >> want to change the text of the templates should maintain their own version
13 >> of the `.tmpl` files"? It's not clear to me how this todo item could be
14 >> closed in a way acceptable to you, except perhaps as WONTFIX. --[[smcv]]
18 ikiwiki/ todo/ Add space before slash in parent links
22 ikiwiki / todo / Add space before slash in parent links
26 diff --git a/templates/misc.tmpl b/templates/misc.tmpl
27 index 184920e..80e6d0b 100644
28 --- a/templates/misc.tmpl
29 +++ b/templates/misc.tmpl
34 -<TMPL_VAR INDEXLINK>/ <TMPL_VAR TITLE>
35 +<TMPL_VAR INDEXLINK> / <TMPL_VAR TITLE>
39 diff --git a/templates/page.tmpl b/templates/page.tmpl
40 index 3a1ac9e..1978e93 100644
41 --- a/templates/page.tmpl
42 +++ b/templates/page.tmpl
46 <TMPL_LOOP NAME="PARENTLINKS">
47 -<a href="<TMPL_VAR NAME=URL>"><TMPL_VAR NAME=PAGE></a>/
48 +<a href="<TMPL_VAR NAME=URL>"><TMPL_VAR NAME=PAGE></a> /
52 diff --git a/templates/recentchanges.tmpl b/templates/recentchanges.tmpl
53 index e03482f..4877395 100644
54 --- a/templates/recentchanges.tmpl
55 +++ b/templates/recentchanges.tmpl
60 -<TMPL_VAR INDEXLINK>/ <TMPL_VAR TITLE>
61 +<TMPL_VAR INDEXLINK> / <TMPL_VAR TITLE>
67 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
69 <h1><TMPL_LOOP NAME="PARENTLINKS"><a
70 href="<TMPL_VAR NAME=URL>"><TMPL_VAR NAME=PAGE></a>
72 </TMPL_LOOP><TMPL_VAR TITLE></h1>
74 This is what I do on my site for example. -- [[Jon]]
76 > You don't actually need to fork the whole directory, "only" `page.tmpl` -
77 > put `templatedir => "/foo/templates"` in your setup file, copy `page.tmpl`
78 > to that directory, and modify it there. IkiWiki will look in `templatedir`
79 > first, then fall back to its default templates if any are missing from
82 > (Admittedly, `page.tmpl` is the hardest to maintain a fork of, because it
83 > tends to change whenever a new plugin is added...) --[[smcv]]
87 Here is a solution which doesn't require people to create their own
88 `page.tmpl`. The solution uses an HTML list together with CSS to draw the
89 separator and can therefore be controlled by users. This change also
90 allows people to control other aspects of how the parentlinks are
91 displayed. The only drawback is that lynx/w3m don't seem to deal with this
92 CSS feature, but I don't think it's too bad since the parentlinks will
93 simply show up as a list.
95 > I guess I could live with w3m having a second list at the top.
97 > Does this method look identical in the default theme? What about the
98 > other themes? Several of them do things with parentlinks css.. --[[Joey]]
100 (I see that the other patch changes templates/misc.tmpl and
101 templates/recentchanges.tmpl for INDEXLINK. I haven't done that but can do
102 so if [[Joey]] likes this approach.)
104 > Those template no longer have the redundant stuff. --[[Joey]]
108 diff --git a/doc/style.css b/doc/style.css
109 index 35a1331..b726365 100644
112 @@ -129,6 +129,23 @@ pre {
116 +ul.parentlinks li:after {
130 +list-style-type: none;
136 diff --git a/templates/page.tmpl b/templates/page.tmpl
137 index 770ac23..f54493e 100644
138 --- a/templates/page.tmpl
139 +++ b/templates/page.tmpl
141 <TMPL_IF HTML5><section class="pageheader"><TMPL_ELSE><div class="pageheader"></TMPL_IF>
142 <TMPL_IF HTML5><header class="header"><TMPL_ELSE><div class="header"></TMPL_IF>
144 +<TMPL_IF PARENTLINKS>
145 <span class="parentlinks">
146 +<ul class="parentlinks">
147 <TMPL_LOOP PARENTLINKS>
148 -<a href="<TMPL_VAR URL>"><TMPL_VAR PAGE></a>/
149 +<li><a href="<TMPL_VAR URL>"><TMPL_VAR PAGE></a></li>
156 <TMPL_IF ISTRANSLATION>