Tags:
create new tag
, view all tags

Question

Hey guys,

I can't figure out how to escape the ImagePlugin inside of IfStatements.

Ideally, the IfStatements would work something like this :

IF joe has view access to DestinationTopic, THEN joe sees the "lucky cat shirt" image as follows :

%IMAGE{"%WEB%/%TOPIC%/lucky_cat_tshirt.jpg|500px" type="frame" align="none" href="DestinationTopic" caption="lucky cat chirt"}%

Otherwise, a different image, or nothing ..

Environment

TWiki version: unspecified
TWiki plugins: ImagePlugin
Server OS:  
Web server:  
Perl version:  
Client OS:  
Web Browser:  
Categories: Documentation

-- KeithHelfrich - 07 May 2008

Answer

ALERT! If you answer a question - or have a question you asked answered by someone - please remember to edit the page and set the status to answered. The status is in a drop-down list below the edit box.

I've answered my own question smile

The solution came from the IfDefinedPlugin#IFACCESS, which has a much easier syntax with escapes and everything ..

%IFACCESS{"DestinationTopic" type="view" then="<H2>[[DestinationTopic][Destination Topic]</H2> $percntIMAGE{\"$percntWEB$percnt/$percntTOPIC$percnt/lucky_cat_tshirt.jpg|500px\" type=\"frame\" align=\"none\" href=\"DestinationTopic\" caption=\"\" width=\"500\" height=\"350\"}$percnt" else="<H2>There's more...</H2> $percntBR$percnt [[%SCRIPTURL%login][Login]] or register"}% 

-- KeithHelfrich - 07 May 2008

The end result of this work was GuestButtons .. smile

-- KeithHelfrich - 10 May 2008

 
Change status to:
Topic revision: r4 - 2008-05-10 - KeithHelfrich
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.