summaryrefslogtreecommitdiff
path: root/doc/plugins
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-09-27 16:45:27 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-09-27 16:45:27 -0400
commita5d3acd37cd52a5cf0045ae4d300a2ef13a07a6e (patch)
treec3d541291f291d3fbce4fe4f2816eec29403a32c /doc/plugins
parent61426a71868a6863115b0a4e0467756e97953092 (diff)
Add %wikistate, which is like %pagestate except not specific to a given page, and is preserved across rebuilds.
Diffstat (limited to 'doc/plugins')
-rw-r--r--doc/plugins/write.mdwn9
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn
index 0e4f2fd6f..4e27d361d 100644
--- a/doc/plugins/write.mdwn
+++ b/doc/plugins/write.mdwn
@@ -467,6 +467,15 @@ When pages are deleted, ikiwiki automatically deletes their pagestate too.
Note that page state does not persist across wiki rebuilds, only across
wiki updates.
+### %wikistate
+
+The `%wikistate` hash can be used by a plugin to store persistant state
+that is not bound to any one page. To set a value, use
+`$wikistate{$id}{$key}=$value, where `$value` is anything Storable can
+serialize, `$key` is any string you like, and `$id` must be the same as the
+"id" parameter passed to `hook()` when registering the plugin, so that the
+state can be dropped if the plugin is no longer used.
+
### Other variables
If your plugin needs to access data about other pages in the wiki. It can