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 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.

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:
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2008-03-12 - MichaelCarter
 
  • 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.