]> sipb.mit.edu Git - ikiwiki.git/blobdiff - doc/plugins/write.mdwn
* Add preview parameter to preprocesser calls, use this rather than the
[ikiwiki.git] / doc / plugins / write.mdwn
index c10d73cf9b4288e4cdf81fd8ab35afc8f9217e77..5547ae6999d5a70de49f01b70c2f650bc7396ebd 100644 (file)
@@ -96,9 +96,11 @@ 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, while a "destpage" parameter gives 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.
+content is going to (different for inlined pages), and a "preview"
+parameter is set to a true value if the page is being previewed. 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.
 
 Note that if the [[htmlscrubber]] is enabled, html in
 [[PreProcessorDirective]] output is sanitised, which may limit what your
@@ -329,7 +331,7 @@ subdirectory with the same name as the source page, failing that
 goes down the directory tree to the base looking for matching
 pages, as described in [[SubPage/LinkingRules]].
 
-#### `htmllink($$$;$$$)`
+#### `htmllink($$$;@)`
 
 Many plugins need to generate html links and add them to a page. This is
 done by using the `htmllink` function. The usual way to call
@@ -346,11 +348,13 @@ Here `$destpage` is the inlining page. A `destpage` parameter is passed to
 some of the hook functions above; the ones that are not passed it are not used
 during inlining and don't need to worry about this issue.
 
-The remaining three optional parameters to `htmllink` are:
+After the three required parameters, named parameters can be used to
+control some options. These are:
 
-1. noimageinline - set to true to avoid turning links into inline html images
-1. forcesubpage  - set to force a link to a subpage
-1. linktext - set to force the link text to something
+* noimageinline - set to true to avoid turning links into inline html images
+* forcesubpage  - set to force a link to a subpage
+* linktext - set to force the link text to something
+* anchor - set to make the link include an anchor
 
 #### `readfile($;$)`