]> sipb.mit.edu Git - ikiwiki.git/blobdiff - doc/plugins/write.mdwn
second parameter of urlto is optional
[ikiwiki.git] / doc / plugins / write.mdwn
index dbbe83851c0c5efbb2022d50b7b70e6d9798151a..ccdf9f393cfc34a1d34c654fc0a27e062a0366ac 100644 (file)
@@ -982,12 +982,17 @@ This is the standard gettext function, although slightly optimised.
 
 This is the standard ngettext function, although slightly optimised.
 
-### `urlto($$;$)`
+### `urlto($;$$)`
 
 Construct a relative url to the first parameter from the page named by the
 second. The first parameter can be either a page name, or some other
 destination file, as registered by `will_render`.
 
+If the second parameter is `undef` (or not specified), the URL will be
+valid from any page on the wiki, or from the CGI; if possible it'll
+be a path starting with `/`, but an absolute URL will be used if
+the wiki and the CGI are on different domains.
+
 If the third parameter is passed and is true, an absolute url will be
 constructed instead of the default relative url.
 
@@ -1154,8 +1159,6 @@ context, and the whole diff in scalar context.
 This is used to get the page creation time for a file from the RCS, by looking
 it up in the history.
 
-It's ok if this is not implemented, and throws an error.
-
 If the RCS cannot determine a ctime for the file, return 0.
 
 #### `rcs_getmtime($)`
@@ -1210,6 +1213,9 @@ It should try to revert the specified rev, and leave the reversion staged
 so `rcs_commit_staged` will complete it. It should return undef on _success_
 and an error message on failure.
 
+This hook and `rcs_preprevert` are optional, if not implemented, no revert
+web interface will be available.
+
 ### PageSpec plugins
 
 It's also possible to write plugins that add new functions to