Tags:
create new tag
, view all tags

Question

I saw a very cool example in the Wikis For Dummies book. In chapter 14 page 274 and 275 they have a Beatles Fan Forum topic that displayes search results. In the search results instead of simply showing the topic names they show a view topic icon. When you click on the view topic icon you are taken to that topic. I'm trying to do this and below is the code I'm using right from the book.

%SEARCH{"BeatlesFan[0-9]" type="regex" scope="topic" excludetopic="BeatlesFanTemplate" nosearch="on" nototal="on"
     header="| *Entry* | *Fan Name* | *Favorite Beatle* | *Super Fan* | *Fan Story* |"
     format="|  [[$topic][%PUBURL%/%TWIKIWEB%/TWikiDocGraphics/viewtopic.gif]]  | $formfield(FanName) | $formfield(FavoriteBeatle) | $formfield(SuperFan) | $formfield(FanStory) |"}%

My probelm is instead of showing the view topic icon it shows the full path. For example, I see

http://xxx-xxx-xxxx/twiki/pub/TWiki/TWikiDocGraphics/viewtopic.gif

I'll be embarrassed if I simply made a silly typo. My apologies in advance if that is the case. Thanks for your help!

Environment

TWiki version: TWikiRelease04x02x00
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: Windows XP
Web server: Apache 2.2.4
Perl version: Perl 5.8.8
Client OS: Windows XP
Web Browser: IE Version 6
Categories: Search

-- MichaelCarter - 07 Mar 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.

Image URLs require leading whitespace or parenthesis to render as images. Alternatively, specify a full img tag, such as:
[[$topic][<img src='%ICONURLPATH{viewtopic' alt='view' width='16' height='16' border='0' />]]

-- PeterThoeny - 08 Mar 2008

Thank you Peter! The code below worked which has a small tweak to what you provided but I knew what you meant. wink

[[$topic][<img src='%ICONURLPATH{viewtopic}%' alt='view' width='16' height='16' border='0' />]]

-- MichaelCarter - 12 Mar 2008

 
Change status to:
Topic revision: r3 - 2008-03-12 - MichaelCarter
 
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.