summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-07-27 23:41:58 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-07-27 23:41:58 +0000
commitdea23a1031b55dbc408e9f99c761fd667331cccd (patch)
treed4f036e9c2ef355693503a0f7ea84158ae549f2b /doc
parent8d2c59804253ae513dda89cc6b733478c4c86fb6 (diff)
* Switch pagetemplate hooks to using named parameters.
* Pass a "destpage" parameter to preprocessor and pagetemplate hooks. This will be the page that a source page will be part of, which is different than the source page for inlined pages. * Audited all plugins to endure they pass page, destpage to htmllink appropriatly. This means inlining of various plugins will not work properly, with correct links generated.
Diffstat (limited to 'doc')
-rw-r--r--doc/plugins/write.mdwn15
-rw-r--r--doc/roadmap.mdwn2
2 files changed, 10 insertions, 7 deletions
diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn
index abad87568..16b6e9d8e 100644
--- a/doc/plugins/write.mdwn
+++ b/doc/plugins/write.mdwn
@@ -38,9 +38,10 @@ the preprocessor directive.
Each time the directive is processed, the referenced function (`preprocess`
in the example above) is called, and is passed named parameters. A "page"
parameter gives the name of the page that embedded the preprocessor
-directive. All parameters included in the directive are included as named
-parameters as well. Whatever the function returns goes onto the page in
-place of the directive.
+directive, while a "destpage" parameter gices the name of the page the
+content is going to (different for inlined pages). All parameters included
+in the directive are included as named parameters as well. Whatever the
+function returns goes onto the page in place of the directive.
## Error handing
@@ -94,9 +95,11 @@ languages to ikiwiki.
IkiWiki::hook(type => "pagetemplate", id => "foo", call => \&pagetemplate);
Each time a page is rendered, a [[template|templates]] is filled out.
-This hook allows modifying that template. The function is passed the name
-of the page, and a `HTML::Template` object that is the template that will
-be used to generate the page. It can manipulate that template object.
+This hook allows modifying that template. The function is passed named
+parameters. The "page" and "destpage" parameters are the same as for a
+preprocess hook. The "template" parameter is a `HTML::Template` object that
+is the template that will be used to generate the page. The function
+can manipulate that template object.
The most common thing to do is probably to call $template->param() to add
a new custom parameter to the template. Note that in order to be robust,
diff --git a/doc/roadmap.mdwn b/doc/roadmap.mdwn
index e2b74e4be..05ee48dff 100644
--- a/doc/roadmap.mdwn
+++ b/doc/roadmap.mdwn
@@ -14,7 +14,7 @@ Released 29 April 2006.
* Unit test suite (with tests of at least core stuff like
[[GlobList]]). (status: exists, could of course use more tests)
-* [[Plugins]] _(status: done)_
+* [[Plugins]] _(status: done, interface still not quite stable)_
* [[Tags]] _(status: partial)_
* Should have fully working [[todo/utf8]] support. _(status: fair)_
* [[Optimised_rendering|todo/optimisations]] if possible. Deal with other