Use case: I want to publish customized documentation to users that I
support. The pages will be largely identical with small items such as
hostnames that are specific to the different users. I could do this
with templates, but I also want to avoid keeping each document in sync
manually when I need to update the documentation.
I've written two new macros and one action that build on top of the
existing GetVal macro to accomplish this.
The first macro:
saves the value given in "vardict" in the request object. This value
should name a page formatted as a wiki dict to provide values which will
be referenced in the page named by "template". If the query includes
the key "edit" (as in /url?edit), the template will be surrounded by
<form> tags and a submit button will be included at the end.
The second macro:
is used in the template. It will load the value named by "key" from the
wiki dict referenced in the IncludeWithVals macro that included this
page. If the query includes the key "edit"), the values will be printed
as form input items rather than text.
The action is referenced by the form printed by <<IncludeWithVals>>. It
will load all of the values present in the wiki dict named by "vardict",
replace any values which are present in the form input, and save the
results. Any content of the wiki dict which is not part of the dict
itself will be lost.