cross
New Foswiki release 2.1.6 is available with important security fixes.
Sourceforge foswiki email lists being discontinued. Subscribe to the new Foswiki announce and discuss lists at MailingLists
This question about Using an extension: Answered

REDIRECT inside IfSTATEMENT

Good morning everyone, i've a question about the IfStatement and the redirect. I need to redirect users on different web on login. I've created a starting page on the Main for the redirect who contains all the if control. I try to compare the Wikiname on a particular string (users have only 1 account, for their company, so this is better for me, i know it's absolutely not optimized).

The instruction is like this:

%IF{"'%WIKINAME%'='WikiName'" then="%REDIRECT{"TopicName"}%" else=""}%

Well at this point, the page will automatically redirect without eveng doing the control. There's some method to do the same thing in a better way?

Thank for the attention guys and sorry for bad english, not native!

-- DarioBergamaschi - 29 Jul 2016

Try this:

%IF{
   "'%WIKINAME%'='WikiName'" 
   then="$percntREDIRECT{\"TopicName\"}$percnt"
}%

-- MichaelDaum - 29 Jul 2016

so easy! Thank you! It go perfectly now!

-- DarioBergamaschi - 29 Jul 2016
 

QuestionForm edit

Subject Using an extension
Extension RedirectPlugin
Version Foswiki 2.1.0
Status Answered
Related Topics
Topic revision: r3 - 29 Jul 2016, DarioBergamaschi - This page was cached on 19 Aug 2018 - 09:36.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy