]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - doc/templates/discussion.mdwn
In rebuilds, assume that every page has been scanned by the time the scan phase ends
[git.ikiwiki.info.git] / doc / templates / discussion.mdwn
1 This confuses me enormously. Perhaps because I am new to ikiwiki, to perl, to Linux, etc.
3 note and popups are templates? But they're not in the templates directory, and in my readings here, templates are supposed to be in the ../templates directory. 
5 > Ikiwiki has an basewiki underlay that provides wiki files not included in
6 > your personal wiki sources. The note and popup template pages are
7 > installed there, typically in `/usr/share/ikiwiki/basewiki/templates/`
8 > --[[Joey]]
10 > > And how am I able to use e.g. links? It's not listed in `/usr/share/ikiwiki/basewiki/templates`.
11 > > I intend do (mis)use links for a horizontal navigation. Or may I be better off altering page.tmpl?
12 > > --z3ttacht
14 ----
16 Is there a list of the TMPL_VAR-Variables that are defined by ikiwiki?
18 What I'm trying to achieve is to print the URL of every page on the page itself and therefore I would need the corresponding value in the Template.
20 Am I missing something?  --[[jwalzer]]
22 > If there isn't a suitable variable (I don't think there is a list at
23 > the moment), a [[plugin|plugins/write]] to add one would be about 10
24 > lines of perl - you'd just need to define a `pagetemplate` hook. --[[smcv]]
26 ----
28 Is there a list of all the available variables somewhere, or do I just grep the source for TMPL_VAR?  And is there a way to refer to a variable inside of a wiki page or does it have to be done from a template?  Thanks. -- [[AdamShand]]
30 I pulled a list of variables and posted it, its in the history for [[templates]] under my name. [[justint]]
32 ----
34 I am trying to override `page.tmpl` by providing `templates/page.tmpl` in my `srcdir`- this works, but now `templates/page.tmpl` is created in my `destdir` as well! Is this expected? --chenz
36 > Yes. Every file found in the wiki is treated as either a page (passed through the whole
37 > rendering pipeline to HTML) or an attachment (copied as-is). --[[smcv]]
39 Is there a way to avoid this? --chenz
41 > With the page in your wiki's git repository: not currently.
42 > You can define a `templatedir` in your setup file and put your overridden page.tmpl
43 > there instead. --s
45 ----
47 I'm seeing some curious behaviour with `$srcdir/templates/` templates not being found when
48 pushing from a remote computer. Touching the relevant file on the server and
49 `ikiwiki --setup wiki.setup --refresh -v` sorts it out. I have done `--refresh
50 --wrappers` just to be sure the hooks aren't out of date. Anyone knows what
51 might be causing this? I'm running a custom branch of ikiwiki master from a
52 couple of weeks ago so could be my own doing but my changes are mainly to the
53 album and img plugins. --[[kjs]]
55 > Seems like the issue is rather that the templates aren't found/triggered
56 > when the page render is set off by dependencies rather than direct editing
57 > of the page. Not the remove local issue mentioned above. --[[kjs]]
59 >> Thanks, that was the hint I needed to be able to reproduce this bug. It seems
60 >> to have been caused by an optimization: please try applying
61 >> [commit 5fd863b5](http://source.ikiwiki.branchable.com/?p=source.git;a=commitdiff;h=5fd863b5b05449669ec56c6798d836e3302386e2)
62 >> to your Render.pm. I'll try to work out a way to have the optimization
63 >> without the correctness impact, but for now, reverting the optimization
64 >> seems like the way forward. --s