If I put a link to pdf file, pdf icon is shown
How to make the similar arrangement for another file type (I have an icon
http://akregator.kde.org/wiki/skins/common/images/icons/fileicon-djvu.png
Thanks. Victor
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
If I put a link to pdf file, pdf icon is shown
How to make the similar arrangement for another file type (I have an icon
http://akregator.kde.org/wiki/skins/common/images/icons/fileicon-djvu.png
Thanks. Victor
Hi Victor,
Looking at File's method Icon(), it looks like an easy way to do this would be to put your custom icon in /sapphire/images/app_icons, with the icon named ext_32.gif (where ext is the appropriate file extension).
Ben
It did not work even if I added in typography.css lines similar to those for pdf (filetype I am trying to accommodate is djvu)
Victor
Hum...not sure what the answer is. Maybe someone with more experience with File can comment.
for me, the solution by ben gribaudo worked.
i needed to manage swf files so i placed a file 'swf_32.gif' in the folder mentioned by ben.
thanks for sharing
You can make easily make it on the CSS file. Example code can be
a[href$=".DJVU"], a[href$=".djvu"], {
padding-top: 5px;
padding-bottom: 5px;
padding-left: 20px;
background: transparent url(path/to/your/images/folder/fileicon-djvu.png) no-repeat 5px center;
display:block;
}
Thanks, this helped me a lot. Just note in the code above there is a stray comma you'l need to delete just before the {. Also you'll need to specify the width and height of the image.