Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

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.

Customising the CMS /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

File type icon


Go to End


7 Posts   4744 Views

Avatar
Victor

Community Member, 128 Posts

17 April 2009 at 10:15pm

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

Avatar
Ben Gribaudo

Community Member, 181 Posts

18 April 2009 at 1:24am

Edited: 18/04/2009 1:25am

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

Avatar
Victor

Community Member, 128 Posts

18 April 2009 at 1:36am

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

Avatar
Ben Gribaudo

Community Member, 181 Posts

21 April 2009 at 5:33am

Hum...not sure what the answer is. Maybe someone with more experience with File can comment.

Avatar
schellmax

Community Member, 126 Posts

27 October 2009 at 3:34am

Edited: 27/10/2009 3:36am

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

Avatar
ayyurek

Community Member, 41 Posts

18 November 2009 at 4:00am

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;
	}

Avatar
MattyJ

Community Member, 11 Posts

26 June 2010 at 12:08am

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.