• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

%ICON{anything.jpg}% does not show the icon image. This is contrary to the documentation ("Specify file type only, file name, or full path name") and contrary to Cairo spec. This might break existing TWiki applications.

Test cases:

  • %ICON{jpg}% = JPEG
  • %ICON{anything.jpg}% = JPEG
  • %ICON{/path/to/anything.jpg}% = JPEG
  • %ICON{http://domain.com/path/to/anything.jpg}% = JPEG

-- PTh

This might break existing TWiki applications. How? The ICON variable is new. The is an older discussion: ICON does only render a name of a gif file. If you don't specify the name of an existing gif attachment, nothing is rendered. Note that ICON is something else than the automatically generated file type icons in the attachment list.

I see that the documentation in TWiki.TWikiVariables#ICON_name_small_documentation_gr is incorrect.

Corrected this in SVN 7934.


This might break existing TWiki applications: ICON{jpg} is a Cairo feature. See Cairo behavior at TWiki:Sandbox.TestIcon and Cairo doc at TWiki:TWiki.TWikiVariables#VarICON

-- PTh

Ah, yes, I was mixed up.


In TWiki:Sandbox.TestIcon I only see the default jpg icon rendered, in fact it looks the same as the list at here the top. What should the /path/to/anything.jpg do? Get that image, or see that a jpg icon should be displayed?


The correct behaviour is to cut the dot and everything preceeding it. It looks like it does that now.

-- PTh

That is pretty confusing. From Specify file type only, file name, or full path name I would expect to get the image in that path. Who would possibly write a full path if ICON{jpg} is sufficient? -- AC

Let us turn it around. Why would you use the ICON feature if all you want to show is the jpeg file itself?

The idea is that you can make a nice presentation of a link to a file where the icon depends on the target. So a if you point to a pdf file you get a pdf icon, a jpeg file you get a jpeg icon etc. The variable inside {} could be a Twiki variable or something loaded from a URLPARAM when a topic is created. And then the actual icon shown matches the link next to it or it may in itself be a link. If the ICON feature just shows the picture file inside there is no point in using it in the first place.

-- KJL

In that case I find the documentation confusing.

But this item is closed. -- AC

Summary ICON{/path/file.type} not rendered
ReportedBy PeterThoeny

SVN Range Thu, 22 Dec 2005 build 7896
AppliesTo Engine

Priority Urgent
CurrentState Closed

Checkins 7934
Edit | Attach | Watch | Print version | History: r12 < r11 < r10 < r9 < r8 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r12 - 2005-12-28 - ArthurClemens
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback