Tags:
create new tag
view all tags
ALERT! NOTE: This is a DistributionDocument.
  • Please help maintain high quality documentation: This is a wiki, please fix the documentation if you find errors or incomplete content.
  • Put questions and suggestions concerning the documentation of this topic in the comments section below.
  • Use the Support web for problems you are having using TWiki.
  • Use the Sandbox web to evaluate & test TWiki.

ICON{"name"} -- small documentation graphic or icon of common attachment types

  • Generates the HTML img tag of a small graphic image attached to TWikiDocGraphics. Images typically have a 16x16 pixel size. You can select a specific image by name, or you can give a full file path or URL, in which case the type of the file will be used to select one of a collection of common file type icons.
  • Syntax: %ICON{"name"}%
  • Supported parameters:
    Parameter: Description: Default:
    "name" Name of icon required
    format="..." Format of icon. Supported variables (with Person %ICON{"person"}% example):
    $name - name of icon (person)
    $type - type of icon (gif)
    $filename - icon filename (person.gif)
    $web - web where icon is defined (TWiki)
    $topic - topic where icon is defined (TWikiDocGraphics)
    $description - icon description (Person)
    $width - width of icon ('16')
    $height - height of icon ('16')
    $img - full img tag of icon (<img src="... />)
    $info - icon tag with usage info in title
    $url - URL of icon (http://example.com/pub/TWiki/TWikiDocGraphics/person.gif)
    $urlpath - URL path of icon (/pub/TWiki/TWikiDocGraphics/person.gif)
    format="$img"
    default="else" Alternate icon if named icon is not defined default="$name"
  • Examples:
    • %ICON{"flag-gray"}% returns: Gray flag
    • %ICON{"pdf"}% returns: PDF
    • %ICON{"smile.pdf"}% returns: PDF
    • %ICON{"/home/sweet/home.pdf"}% returns: PDF
    • %ICON{"http://twiki.org/doc/xhtml.xsl"}% returns: XSL (XML style sheet)
    • %ICON{"bubble" format="$description icon is defined in $web.$topic"}% returns: Speech bubble icon is defined in TWikiDocGraphics
  • Graphic samples: Arrow blue right arrowbright, Speech bubble bubble, Yes / Done choice-yes, Pointing hand hand
  • File type samples: Bitmap bmp, Microsoft Word file doc, GIF gif, Standard help file hlp, HTML html, Waveform sound file mp3, PDF pdf, PowerPoint ppt, Text txt, Microsoft Excel Spreadsheet xls, XML xml, Compressed Zip archive zip
  • Category: FormattingAndRenderingVariables
  • Related: ICONURL, ICONURLPATH, TWikiPreferences, FileAttachments, TWikiDocGraphics



Comments & Questions about this Distribution Document Topic

Please use the Support forum if you have questions about TWiki features. This comment section is about the documentation of this topic.

I have a small problem. Probably after someone changed this variable and for example PDF transforms into http://..../TWikiDocGraphics /pdf.gif instead of http://..../TWikiDocGraphics/pdf.gif (there is a %20 before last / ) Do you have an idea what can be wrong?

-- PiotrStapp - 04 Sep 2008

Please ask support questions in the Support web.

Your Main.TWikiPreferences topic is probably corrupted by the WYSIWYG editor. Edit that topic and remove all trailing spaces from the setting.

-- PeterThoeny - 06 Sep 2008

Please use the Support forum if you have questions about TWiki features. This comment section is about the documentation of this topic.
Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r7 - 2012-11-17 - PeterThoeny
 
  • 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-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.