X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/345c707921de3d86081b7b8362266bdee4414086..99626615ff41a257090414bf500a83674e8fdc27:/doc/todo/more_customisable_titlepage_function.mdwn?ds=inline diff --git a/doc/todo/more_customisable_titlepage_function.mdwn b/doc/todo/more_customisable_titlepage_function.mdwn index eb1d62448..97fefbafc 100644 --- a/doc/todo/more_customisable_titlepage_function.mdwn +++ b/doc/todo/more_customisable_titlepage_function.mdwn @@ -2,7 +2,9 @@ I understand the `IkiWiki::titlepage` function is used to generate filenames fro I imagine two things: a lookup hash and a template. -Since `IkiWiki::titlepage` basically translates characters, it would be cool to be able to define a lookup hash in the configuration, which would be consulted before falling back to the generic `__xx__` `ord()` representation of a letter. For instance, in German, I might prefer to have 'ä' become 'ae' instead of something illegible. +Since `IkiWiki::titlepage` basically translates characters, it would be cool to be able to define a lookup hash in the configuration, which would be consulted before falling back to the generic `__xx__` `ord()` representation of a letter. For instance, in German, I might prefer to have 'ä' become 'ae' instead of something illegible. + +> This is [[todo/unaccent_url_instead_of_encoding]]. --[[smcv]] Second, maybe a template could be honoured. The template could have a slot `%s` where the calculated title goes, and it could contain `strftime` symbols as well as variables, which get interpolated on use. @@ -10,4 +12,31 @@ Another option would be a function I could define in the setup file, or an exter -- [[madduck]] +> This somewhat resembles [[todo/inline_postform_autotitles]]. +> Another way to do this, suggested in that todo, would be to +> pre-fill the title field with YYYY/MM/DD/ using Javascript. +> --[[smcv]] + +I don't think that changing titlepage is a good idea, there are +compatability problems. + +Instead, I think that in the specific case of the blogpost form, there +should be an interface to allow plugins to do arbitrary transformatiosn of +the page name. + +So, add a hidden field to blogpost.tmpl, something like blogpost=1. Then in +`editpage`, if blogpost is set, call the blogpost hooks, which are passed +a page name and return a transformed version. + +If the page name is changed by those, then the user's original title might +need to be preserved via a meta title directive. This could just be +inserted if any changes are made to the page name. Only problem with this +is that having the directive appear in the edit box for a new page could +confuse the user. The title could be passed on in a hidden field, and +prepended to the page when it's saved.. + +--[[Joey]] + +> I'll pass on these comments to the two similar todo items. --[[smcv]] + [[wishlist]]