We relaunched the TWiki.org project with an expanded TWiki charter, and we invite you to participate! The TWiki.org Code of Conduct agreement took effect on 27 Oct 2008. We ask existing twiki.org users to opt-in. You need to opt-in to participate in the Blog, Codev, Plugins and TWiki webs. -- PeterThoeny - 27 Oct 2008
You are here: TWiki> Support Web>IconSearchFormat (07 Jun 2008, JohnGee)
Tags:
create new tag
, view all tags

Question

I have a Search function that presents a table from a form. It includes this in the format section:

format="| [[$topic][Link]] |

So, of course, it shows the word "Link" that links to the topic. Instead of a word I want an icon. I have tried constructs like:

format="| [[$topic][%ICON{help}%]] |

to get the help icon instead of the text word "link". It does not work. What is the proper way to do it?

Thanks.

Environment

TWiki version: unspecified
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS:  
Web server:  
Perl version:  
Client OS:  
Web Browser: Fox
Categories: Search

-- JohnGee - 06 Jun 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.

%ICON{help}% expands to a full image tag that contains double quotes. This basically terminates your format="..." prematurely.

Fix: Use just the icon URL (attention: needs a leading space), such as
format="| [[$topic][ %ICONURL{help}% ]] |...|"

Example: home.gif Support home.

-- PeterThoeny - 06 Jun 2008

Thank you so much.

-- JohnGee - 07 Jun 2008

 
Change status to:
Topic revision: r3 - 07 Jun 2008 - 00:40:06 - JohnGee
 
TWIKI.NET
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback