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
r4 - 13 Nov 2012 - 09:03:28 - TWikiContributor
 
Linux & Open Source for AT91 Microchip Microprocessors

Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.

Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.

Microchip and others, are registered trademarks or trademarks of Microchip Technology Inc. and its subsidiaries. This site is powered by the TWiki collaboration platform

Arm® and others are registered trademarks or trademarks of Arm Limited (or its affiliates). Other terms and product names may be trademarks of others.

Ideas, requests, contributions ? Connect to LinksToCommunities page.

Syndicate this siteRSS ATOM