]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - doc/plugins/write.mdwn
add
[git.ikiwiki.info.git] / doc / plugins / write.mdwn
index be5f8692484b710e8e94b47bfbbd5903a38c9591..4dd057074a652c2f24ccc7ac33daa79ad81601d3 100644 (file)
@@ -80,7 +80,7 @@ make arbitrary changes. The function is passed named parameters `page` and
 
 This is identical to a preprocess hook (see below), except that it is
 called in the initial pass that scans pages for data that will be used in
-later passes. Scan hooks are the only hook that should modify 
+later passes. Scan hooks are the only hook that should modify `%links`.
 
 ### preprocess
 
@@ -218,8 +218,8 @@ CGI::FormBuilder]] to generate web forms. These hooks are passed named
 parameters: `cgi`, `session`, and `form`. These are, respectively, the
 `CGI` object, the user's `CGI::Session`, and a `CGI::FormBuilder`.
 
-Each time a form is set up, the formbuilder_setup hook is called.
-Typically the formbuilder_setup hook will check the form's title, and if
+Each time a form is set up, the `formbuilder_setup` hook is called.
+Typically the `formbuilder_setup` hook will check the form's title, and if
 it's a form that it needs to modify, will call various methods to
 add/remove/change fields, tweak the validation code for the fields, etc. It
 will not validate or display the form.
@@ -264,11 +264,11 @@ hash. The best way to understand the contents of the hash is to look at
 If your plugin needs to access data about other pages in the wiki. It can
 use the following hashes, using a page name as the key:
 
-* `%links` lists the names of each page that a page links to, in an array
+* `links` lists the names of each page that a page links to, in an array
   reference.
-* `%renderedfiles` lists names of the files rendered by a page, in an array
-  reference.
-* `%pagesources` contains the name of the source file for a page.
+* `%destsources` contains the name of the source file used to create each
+  destination file.
+* `%pagesources` contains the name of the source file for each page.
 
 Also, the %IkiWiki::version variable contains the version number for the
 ikiwiki program.
@@ -414,6 +414,15 @@ Given a time, formats it for display.
 
 This is the standard gettext function, although slightly optimised.
 
+#### `urlto($$)`
+
+Construct a relative url to the first parameter from the second.
+
+#### `targetpage($$)`
+
+Passed a page and an extension, returns the filename that page will be
+rendered to.
+
 ## RCS plugins
 
 ikiwiki's support for revision control systems also uses pluggable perl