Add additional lines to the HTTP header of a page.
Usage
This macro lets you set (any) additional HTTP header lines. You may want to use this make a wiki page downloadable as a file or set a different Content-Type.
Examples
%ADDHTTPHEADER{ name="Content-Type" value="text/plain" }%
The next block shows the wiki text of a more complex example:
%ADDHTTPHEADER{ name="Content-Type" value="text/x-vcard" }%%ADDHTTPHEADER{ name="Content-Disposition" value="attachment; filename=\"%WIKINAME%.vcf\"" }%BEGIN:VCARD
VERSION:2.1
FN:%FORMFIELD{ "FirstName" topic="%USERSWEB%.%WIKINAME%" }% %FORMFIELD{ "LastName" topic="%USERSWEB%.%WIKINAME%" }%
N:%FORMFIELD{ "LastName" topic="%USERSWEB%.%WIKINAME%" }%;%FORMFIELD{ "FirstName" topic="%USERSWEB%.%WIKINAME%" }%;;;
ADR;HOME:;;%FORMFIELD{ "Address" topic="%USERSWEB%.%WIKINAME%" }%;%FORMFIELD{ "Location" topic="%USERSWEB%.%WIKINAME%" }%;;
TEL;PREF;HOME:%FORMFIELD{ "Telephone" topic="%USERSWEB%.%WIKINAME%" }%
END:VCARD
%META:PREFERENCE{name="SKIN" title="SKIN" type="Set" value="text"}%
%META:PREFERENCE{name="COVER" title="COVER" type="Set" value="text"}%
(Please strip the heading space in front of the META lines.)
Copying this to a fresh topic lets you download a vcard of the currently logged-in user (assuming there is a filled
UserForm.
Installation Instructions
Info