aboutsummaryrefslogtreecommitdiff
path: root/doc/todo/multiple_template_directories.mdwn
blob: 0f8f5c880baada9acf3b194e8aabf56fd7049689 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
It would be nice to be able to override a single template without keeping a 
private copy of the entire template directory. 

a setup option like

   templatedirs => [ "my/dir", "/usr/share/ikiwiki/templates" ] 

ought to do the trick.

> Now that I look at the source, I see that ikiwiki already falls back to the 
> global dir when it cannot find a template. For me, this is good enough.
> And it is even documented in the man page. Sigh. I guess this could be 
> considered [[done]].  

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

> [[plugins/underlay]] used to allow adding extra templatedirs, but Joey
> removed that functionality when he made templates search the wiki's
> own `templates` directory.
>
> You can get a 3-level hierarchy like this:
>
> * instance-specific overrides: $srcdir/templates
> * common to the entire site: a directory that is the value of all
>   instances' `templatedir` parameters
> * common to every ikiwiki in the world: /usr/share/ikiwiki/templates
>   (implicitly searched)
>
> (by "instance" I mean an instance of ikiwiki - a .setup file, basically.)
>
> For a more complex hierarchy you'd need the old [[plugins/underlay]]
> functionality, i.e. you'd need to (ask Joey to) revert the patch that
> removed it. For instance, if anyone has a hierarchy like this, then
> they need the old functionality back in order to split the template
> search path for the things marked `(???)`:
>
>     every ikiwiki in the world (/usr/share/ikiwiki/templates)
>     \--- your site (???)
>         \--- your blogs (???)
>              \--- travel blog ($srcdir/templates)
>              \--- code blog ($srcdir/templates)
>         \--- your wikis (???)
>              \--- travel wiki ($srcdir/templates)
>              \--- code wiki ($srcdir/templates)
>
> This looks pretty hypothetical to me, though...
> --[[smcv]]