Add icons to your links and creates small images for them according to there link extensions.

Picture of the recipe

Questions Answered By This Recipe

How can I easily display the type of links like PDF, HTML with a little icon according to the type and can use the icons for external links while internal links of my wiki are displayed in normal style?


This recipe simply add icons to your links. Just follow the instruction of the installation.


  • download from source or via git git clone git@bitbucket.org:wikimatze/pmwiki-linkicons-recipe.git
  • unzip everything
  • make the following copy-tasks:
    • put linkicons.php to your cookbook directory
    • put linkicons directory in your public directory (normally pub)
    • put linkicons.css in your CSS directory (normally pub/css)
  • now you should have the following structure
    • cookbook/linkicons.php
    • pub/linkicons
    • pub/css/linkicons.css
  • add to local/config.php in the following order:
    • $UrlLinkFmt= "<a class='external' href='\\$LinkUrl' rel='nofollow'\>\\$LinkText</a\>";
    • include_once("$FarmD/cookbook/linkicons.php");


Credits goes to Jeremie Tisseau. The icons are from FamFamFam. This recipe doesn't work under Internet-Explorer - feel free to post the CSS-hacks to get it working. To enable the upload of SVG's you need to add $UploadExts['svg'] = 'image/svg'; in your config.php.

See Also

  • External Links Configure external links to open in a new window, have a "tool tip title", or use other CSS classes.
  • External Links2 Add and icon to external links and make them automatically open in a new window.
  • Attach Icons Add icon images to Attach file links according to file extension.
  • Attach Icons2 Add icon images to Attach file links according to file extension.
  • Custom Bullets Enable custom bullets to distinguish document types.


See Linkicons-Talk - your comments are welcome there!


Feature request, bugs, questions, and so on can be send to matthias.guenther@wikimatze.de. If you enjoy the script please leave your comment under Linkicons Users.


This software is licensed under the MIT license.

© 2011-2013 Matthias Guenther matthias.guenther@wikimatze.de.

/ vim: set ts=2 sw=2 textwidth=120: /