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
--
MichaelCarter - 07 Mar 2008
Answer
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.
[[$topic][<img src='%ICONURLPATH{viewtopic}%' alt='view' width='16' height='16' border='0' />]]
--
MichaelCarter - 12 Mar 2008