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 someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.

I've answered my own question smile

The solution came from the IfDefinedPlugin, 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:
Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2008-05-10 - KeithHelfrich
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.