From 4bb245df90965898b3e572d67c4fda25b0be84c5 Mon Sep 17 00:00:00 2001 From: Changaco Date: Mon, 17 May 2010 16:46:28 +0000 Subject: --- doc/todo/multiple_template_directories.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc/todo/multiple_template_directories.mdwn') diff --git a/doc/todo/multiple_template_directories.mdwn b/doc/todo/multiple_template_directories.mdwn index c09a9595f..6d1632b4c 100644 --- a/doc/todo/multiple_template_directories.mdwn +++ b/doc/todo/multiple_template_directories.mdwn @@ -11,3 +11,5 @@ ought to do the trick. > 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 -- cgit v1.2.3 From f864b74859d8b0197f59d7dfe7d45063dc887cd1 Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" Date: Mon, 17 May 2010 17:34:40 +0000 Subject: an example of somewhere where the old functionality is actually needed --- doc/todo/multiple_template_directories.mdwn | 32 +++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'doc/todo/multiple_template_directories.mdwn') diff --git a/doc/todo/multiple_template_directories.mdwn b/doc/todo/multiple_template_directories.mdwn index 6d1632b4c..0f8f5c880 100644 --- a/doc/todo/multiple_template_directories.mdwn +++ b/doc/todo/multiple_template_directories.mdwn @@ -13,3 +13,35 @@ ought to do the trick. > 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]] -- cgit v1.2.3 From 3298902443128f68e21f4ad349a7a3a9e0f03bce Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 17 May 2010 15:46:07 -0400 Subject: response --- doc/todo/multiple_template_directories.mdwn | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc/todo/multiple_template_directories.mdwn') diff --git a/doc/todo/multiple_template_directories.mdwn b/doc/todo/multiple_template_directories.mdwn index 0f8f5c880..fe1951d51 100644 --- a/doc/todo/multiple_template_directories.mdwn +++ b/doc/todo/multiple_template_directories.mdwn @@ -45,3 +45,8 @@ I have a use case for this, a site composed of blogs and wikis, templates divide > > This looks pretty hypothetical to me, though... > --[[smcv]] + +>> The reason I removed it is because the same functionality of having +>> multiple template directories is still present. Just put them in +>> the templates/ subdirectory of multiple underlay directories instead. +>> --[[Joey]] -- cgit v1.2.3 From 1f974b3517b3601e5014fcb0a383f980b4953a8c Mon Sep 17 00:00:00 2001 From: Changaco Date: Mon, 17 May 2010 23:36:16 +0000 Subject: problem solved --- doc/todo/multiple_template_directories.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc/todo/multiple_template_directories.mdwn') diff --git a/doc/todo/multiple_template_directories.mdwn b/doc/todo/multiple_template_directories.mdwn index fe1951d51..b8b9651b9 100644 --- a/doc/todo/multiple_template_directories.mdwn +++ b/doc/todo/multiple_template_directories.mdwn @@ -50,3 +50,5 @@ I have a use case for this, a site composed of blogs and wikis, templates divide >> multiple template directories is still present. Just put them in >> the templates/ subdirectory of multiple underlay directories instead. >> --[[Joey]] + +>>>Thanks, I didn't realize this was possible. Problem solved. -- Changaco -- cgit v1.2.3 From 284038fbbf09a55ae23ebeca03f8ff4487ce7ef6 Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" Date: Tue, 18 May 2010 09:23:23 +0000 Subject: tag as done --- doc/todo/multiple_template_directories.mdwn | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'doc/todo/multiple_template_directories.mdwn') diff --git a/doc/todo/multiple_template_directories.mdwn b/doc/todo/multiple_template_directories.mdwn index b8b9651b9..6a474b4f3 100644 --- a/doc/todo/multiple_template_directories.mdwn +++ b/doc/todo/multiple_template_directories.mdwn @@ -52,3 +52,22 @@ I have a use case for this, a site composed of blogs and wikis, templates divide >> --[[Joey]] >>>Thanks, I didn't realize this was possible. Problem solved. -- Changaco + +>>>> We can consider this [[done]], then. For reference, the solution +>>>> to the hierarchy I mentioned above would be: +>>>> +>>>> all your sites have $your_underlay as an underlay +>>>> +>>>> the blogs and wikis all have $blog_underlay or $wiki_underlay +>>>> (as appropriate) as a higher priority underlay +>>>> +>>>> every ikiwiki in the world (/usr/share/ikiwiki/templates) +>>>> \--- your site ($your_underlay/templates, or templatedir) +>>>> \--- your blogs ($blog_underlay/templates) +>>>> \--- travel blog ($srcdir/templates) +>>>> \--- code blog ($srcdir/templates) +>>>> \--- your wikis ($wiki_underlay/templates) +>>>> \--- travel wiki ($srcdir/templates) +>>>> \--- code wiki ($srcdir/templates) +>>>> +>>>> --[[smcv]] -- cgit v1.2.3