@Daniel no need for config file, just drop any 16x16px gif in the /umbraco/images/umbraco/media/ folder where it's file name is the extension to match (ie jpg.gif, pdf.gif, xls.gif). If a file isn't found with that extension, the default umbraco graphic is used.
Matches are made against the pysical file name, not the media title.
Matt, first of all thanks for bringing a little sunshine to our umbraco lives :-) Definitely should be part of core if you ask me, we keep installing this on most sites we put up. Were wondering however, if you'd be willing to share the source? We're thinking of re-using the functinality for a user control displaying files for download, and it seems most logical to hook it up with your dll. If not, perhaps you could outline how you hooked your custom mechanisms into standard umbraco .ContentType.IconUrl?
Matt, you're a star - thank you ever so much for sharing! I keep being amazed at how the Umbraco community is an inclusive, open and kind bunch of people.
This isn't working for me unfortunatley. I have a fresh install of 4.72 and installed the package through the package repository. After installation, the folder /umbraco/images/umbraco/media/ did not exists. I create the media folder and added a 16x16 icon called pdf.gif to it. I went to look at the pdf files stored in my media tree and the new icon dd not show. Any guidance would be appreciated. Thanks.
UPDATE: I figred out the problem and my installation is working great now. For some reason the image assets and dlls were all under the wrong directory (/umbraco4/images/umbraco/media/). /Umbraco4 is the name of the folder which contains my and for some reason a folder with the same name was created under it.
works GREAT!
Thank you so much for putting this together... been bugging me for EVER!
No problem.
If you've got any other file extensions you think would be good to add to the default install, just let me know.
Matt
Nice job!.. it's the small tweaks like this that add so much to the experience... will be installing on several sites.
Maybe add a config file to add custom extensions.
Is the icon based on extension in name or file (hope it's the later)
this should be default on umbraco, great idea for a package :)
Cheers guys
@Daniel no need for config file, just drop any 16x16px gif in the /umbraco/images/umbraco/media/ folder where it's file name is the extension to match (ie jpg.gif, pdf.gif, xls.gif). If a file isn't found with that extension, the default umbraco graphic is used.
Matches are made against the pysical file name, not the media title.
Matt
Neat package. I have been thinking about making a similar one for ages, but you beat me to it :)
Cheers
Bjørn
@Bjorn glad you like it, and you'll need to be faster next time =)
Great work Matt - works well on 4.7.0 :)
Something so simple makes a big difference to users, and stops those "why do my PDFs have a CD icon next to them?" questions!
Hehe, thanks. Glad you find it usefull.
Matt
Matt, first of all thanks for bringing a little sunshine to our umbraco lives :-) Definitely should be part of core if you ask me, we keep installing this on most sites we put up. Were wondering however, if you'd be willing to share the source? We're thinking of re-using the functinality for a user control displaying files for download, and it seems most logical to hook it up with your dll. If not, perhaps you could outline how you hooked your custom mechanisms into standard umbraco .ContentType.IconUrl?
Hi Dav,
I've now added a link to the source code on the main projects page (underneath the resources heading).
Many thanks
Matt
Matt, you're a star - thank you ever so much for sharing! I keep being amazed at how the Umbraco community is an inclusive, open and kind bunch of people.
Another very helpful package! Nice one mate.
Chris
This isn't working for me unfortunatley. I have a fresh install of 4.72 and installed the package through the package repository. After installation, the folder /umbraco/images/umbraco/media/ did not exists. I create the media folder and added a 16x16 icon called pdf.gif to it. I went to look at the pdf files stored in my media tree and the new icon dd not show. Any guidance would be appreciated. Thanks.
UPDATE: I figred out the problem and my installation is working great now. For some reason the image assets and dlls were all under the wrong directory (/umbraco4/images/umbraco/media/). /Umbraco4 is the name of the folder which contains my and for some reason a folder with the same name was created under it.
is working on a reply...