X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/040e174b2c5e849cbfa256694813731e444ca4ae..a7131ffc3e38d27fb7e64fa528a63fae61fa5720:/doc/todo/alias_directive.mdwn diff --git a/doc/todo/alias_directive.mdwn b/doc/todo/alias_directive.mdwn index 4d7817694..71a2efc76 100644 --- a/doc/todo/alias_directive.mdwn +++ b/doc/todo/alias_directive.mdwn @@ -27,8 +27,8 @@ suggested for addition (possibly by means of a plugin): > > > > \[[!alias Grece list=false]] > -> This page by itself will redirect from the "Hellas" and "Hellenic Republic" -> pages as if they both contained just: +> This page by itself will redirect from the "Hellas", "Hellenic Republic" and +> "Grece" pages as if they both contained just: > > > \[[!meta redir="Greece"]] > @@ -44,4 +44,29 @@ The proposed plugin/directive could be extended, eg. by also including old-style redirects in the alias list, but that might introduce unwanted coupling with the meta directive. +----------------- + +On second thought, implementing this might have similarities with +[[todo/auto-create tag pages according to a template]] -- the auto-created +pages would, if the way of the alias directive is followed, not create physical +files, though, but be created just when someone edits them. + +If multiple plugins do such a trick, they would have to fight over who comes +first. If, for example, we have a setup where not yet created tag pages are +automatically generated as "\[[!inline pages="link()" +archive="yes"]]" and aliases are enabled, and a non-tag pages grabs a tag as an +alias (as to redirect all taglinks of the tag to itself), there are two +possibilities: + +* The autotag plugin comes first: + * autotag sees the missing tag and creates its "\[[!inline" stuff + * alias sees that there is already content and adds its prefix +* The alias plugin comes first (this is the prefered way): + * alias sees the empty page, sees it is not contested by other alias + directives and creates its "\[[!meta" redirect + * autotag sees there is already content and doesn't do anything + +That issue could be handled with "priority number" on the hook, with plugins +with a lower number being called first. + [[!tag wishlist]]