• Do not register here on develop.twiki.org, login with your twiki.org account. • Use Item7848 for generic doc work for TWiki-6.1.1. Use 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}% =

%ICON{anything.jpg}% =

%ICON{/path/to/anything.jpg}% =

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

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

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.