]> sipb.mit.edu Git - ikiwiki.git/blob - doc/todo/multiple_template_directories.mdwn
Merge branch 'master' of ssh://git.ikiwiki.info/srv/git/ikiwiki.info
[ikiwiki.git] / doc / todo / multiple_template_directories.mdwn
1 It would be nice to be able to override a single template without keeping a 
2 private copy of the entire template directory. 
3
4 a setup option like
5
6    templatedirs => [ "my/dir", "/usr/share/ikiwiki/templates" ] 
7
8 ought to do the trick.
9
10 > Now that I look at the source, I see that ikiwiki already falls back to the 
11 > global dir when it cannot find a template. For me, this is good enough.
12 > And it is even documented in the man page. Sigh. I guess this could be 
13 > considered [[done]].  
14
15 I have a use case for this, a site composed of blogs and wikis, templates divided in three categories : common, blog and wiki. The only solution I found is maintaining hard links, being able to have multiple template dirs would obviously be better. -- Changaco
16
17 > [[plugins/underlay]] used to allow adding extra templatedirs, but Joey
18 > removed that functionality when he made templates search the wiki's
19 > own `templates` directory.
20 >
21 > You can get a 3-level hierarchy like this:
22 >
23 > * instance-specific overrides: $srcdir/templates
24 > * common to the entire site: a directory that is the value of all
25 >   instances' `templatedir` parameters
26 > * common to every ikiwiki in the world: /usr/share/ikiwiki/templates
27 >   (implicitly searched)
28 >
29 > (by "instance" I mean an instance of ikiwiki - a .setup file, basically.)
30 >
31 > For a more complex hierarchy you'd need the old [[plugins/underlay]]
32 > functionality, i.e. you'd need to (ask Joey to) revert the patch that
33 > removed it. For instance, if anyone has a hierarchy like this, then
34 > they need the old functionality back in order to split the template
35 > search path for the things marked `(???)`:
36 >
37 >     every ikiwiki in the world (/usr/share/ikiwiki/templates)
38 >     \--- your site (???)
39 >         \--- your blogs (???)
40 >              \--- travel blog ($srcdir/templates)
41 >              \--- code blog ($srcdir/templates)
42 >         \--- your wikis (???)
43 >              \--- travel wiki ($srcdir/templates)
44 >              \--- code wiki ($srcdir/templates)
45 >
46 > This looks pretty hypothetical to me, though...
47 > --[[smcv]]