|
|
|
|||||||||||||||||||||||||||||||||||||||||||||||
![]() |
Redirect PluginChanged by ProjectContributor on 22 Jun 2007 - 23:25 - r1
Create a redirect to another topic or website I typically use this to make easy-to-type shortforms/acronyms of topic names. For example:
On this page:
Syntax Rules
Prevent redirectingTo view the topic that contains aREDIRECT , pass parameter noredirect=on to the url. For example:
http://wiki.iac.ethz.ch/Main/WebHome?noredirect=on
Wikipedia like "Redirected from..."A redirect now appends theredirectedfrom parameter to the url which contains the Web.Topic that the user has been redirected from. This allows us to display Wikipedia like "Redirected from ..." text on the destination topic. You can use the %URLPARAM{redirectedfrom}% variable to access the parameter and create the "Redirected from..." text.
Below is an example you can put in your template:
%IF{ "$'URLPARAM{redirectedfrom}'" then="<span class='foswikiGrayText'>(Redirected from <a href='%SCRIPTURLPATH{view}%/%URLPARAM{redirectedfrom}%?noredirect=on'>%URLPARAM{redirectedfrom}%</a>)</span>"}% Which will display the following on topics that have been redirected: (Redirected from Web.Topic)
Don't check that the target topic existsIf you pass the dontcheck=1 parameter then Foswiki will let you redirect to a topic that doesn't exist. This is very useful as a way to wrap up data form creators for applications. e.g. RoleCreator:
%REDIRECT{newtopic="%SCRIPTURLPATH{"edit"}%/%BASEWEB%/UnnamedRoleAUTOINC1?topicparent=RoleList;templatetopic=RoleTemplate;t=%SERVERTIME{"$day$hour$min$sec"}%" dontCheck="1"}% Now, for instance in WebLeftBar? you can just use: * [[RoleCreator][Create Role]]
Test topicsIf installed:
Installation InstructionsYou do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server. Open configure, and open the "Extensions" section. Use "Find More Extensions" to get a list of available extensions. Select "Install".
If you have any problems, or if the extension isn't available in
Plugin Files
Plugin Info
![]() |