SCRIPTURL -- URL of script(s)

Expands to the URL of a script, or the base URL of all scripts

Parameters

Parameter Description Default
"$script" Name of script  
web Web name to add to URL  
topic Topic (or Web.Topic) to add to URL  
Any other parameters to the macro will be added as parameters to the URL

Examples

  • %SCRIPTURL{"view" topic="Cartoons.EvilMonkey"}% will expand to https://library.med.utah.edu/wiki/Cartoons/EvilMonkey?topic=Cartoons.EvilMonkey
  • %SCRIPTURL{"view" web="Cartoons"}% will expand to https://library.med.utah.edu/wiki/Cartoons?web=Cartoons
  • %SCRIPTURL{"view" topic="Cartoons.EvilMonkey" rev="1"}% will expand to https://library.med.utah.edu/wiki/Cartoons/EvilMonkey?topic=Cartoons.EvilMonkey;rev=1
  • %SCRIPTURL{"edit" web="Cartoons" topic="EvilMonkey" t="%GMTIME{"$epoch"}%"}% expands to https://library.med.utah.edu/wiki/bin/edit/Cartoons/EvilMonkey?web=Cartoons;t=1557503995;topic=EvilMonkey
  • %SCRIPTURL% expands to https://library.med.utah.edu/wiki/bin
  • %SCRIPTURL{script}% expands to https://library.med.utah.edu/wiki/bin/script
HELP In most cases you should use SCRIPTURLPATH instead, as it works much better with URL rewriting

HELP The edit script should always be used in conjunction a t="%GMTIME{"$epoch"}%" parameter to ensure pages about to be edited are not cached in the browser

ALERT! The 'old' way of building URLs using SCRIPTURL involved concatenating the web and topic names to the SCRIPTURL e.g. %SCRIPTURL{"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 all such URLs with the equivalent %SCRIPTURL%{"script" topic="Cartoons.EvilMonkey"}%, which will handle URL encoding for you.

PUBURL, SCRIPTNAME, SCRIPTSUFFIX, SCRIPTURLPATH
Topic revision: r1 - 18 Jun 2015, ProjectContributor - This page was cached on 10 May 2019 - 09:59.

THE UNIVERSITY OF UTAHSPENCER S. ECCLES HEALTH SCIENCES LIBRARY
10 N. 1900 E. SALT LAKE CITY, UT 84112 • 801.581.7535
Ideas, requests, problems regarding Eccles Health Sciences Library wiki? Send feedback