Parameter | Description | Default |
---|---|---|
Any other parameters to the macro will be added as parameters to the URL | ||
"$script" |
Name of script | |
topic |
Topic (or Web.Topic) to add to URL | |
web |
Web name to add to URL |
%SCRIPTURLPATH{"view" topic="Cartoons.EvilMonkey"}%
expands to /foswiki/bin/view/Cartoons/EvilMonkey?topic=Cartoons.EvilMonkey
%SCRIPTURLPATH{"view" web="Cartoons"}%
expands to /foswiki/bin/view/Cartoons?web=Cartoons
%SCRIPTURLPATH{"view" topic="Cartoons.EvilMonkey" rev="1"}%
will expand to /foswiki/bin/view/Cartoons/EvilMonkey?topic=Cartoons.EvilMonkey;rev=1
%SCRIPTURLPATH{"edit" web="Cartoons" topic="EvilMonkey" t="%GMTIME{"$epoch"}%"}%
expands to /foswiki/bin/edit/Cartoons/EvilMonkey?topic=EvilMonkey;t=1730419669;web=Cartoons
%SCRIPTURLPATH%
expands to /foswiki/bin
%SCRIPTURLPATH{script}%
expands to /foswiki/bin/script
edit
script should always be used in conjunction with a t="%GMTIME{"$epoch"}%"
parameter to ensure pages about to be edited are not cached in the browser
See SCRIPTURL
if you expect to need the protocol and host e.g. if you are saving the HTML of the page and using it on a different host.
The 'old' way of building URLs using SCRIPTURLPATH
involved concatenating the web and topic names to the SCRIPTURLPATH
e.g. %SCRIPTURLPATH{"script"}%/Cartoons/EvilMonkey
. This practice is strongly discouraged, as it does not correctly handle encoding of the parts of the URL. At the first opportunity you should replace such URLs with the equivalent %SCRIPTURLPATH%{"script" topic="Cartoons.EvilMonkey"}%, which will handle URL encoding for you.