Media Library file names. Tired of guids?

Have you noticed that when uploading files to the media library, sometimes the resulting file name is a guid? If I upload an image, say Brian.jpg, I need to write ~/media/9B62BB56FD6040FAA56C6DB1D8A0BDE6.ashx in order to acces it from the front end.

And why is this a problem? Some search crawlers use the file name as title when the item is indexed. The Ankiro crawler can be configured to use the meta title (found in PDF or Word documents) or the file name as index title. Seeing a search result list with the file name 9B62BB56FD6040FAA56C6DB1D8A0BDE6 is not very explanatory for the end users.

Can this be configured? Well of course. This is Sitecore we are talking about.

The web.config contains loads of settings controlling the Media Library. Set the Media.UseItemPaths to true and your uploaded files will answer to the original file name so my Brian.jpg can be accessed at ~/media/Folder/Brian.ashx instead.

<!--  MEDIA - USE ITEM PATHS FOR URLS
      This setting controls if item paths are used for constructing media URLs.
      If false, short ids will be used.
      Default value: true
-->
<setting name="Media.UseItemPaths" value="true" />

XSLT Quick reference

I am using a lot of XSLT in my work with Sitecore 4 and 5. Practically every component that reads from Sitecore I do in XSLT. Only backend, formulars and business logic is programmed in c#.

One of my colleagues reminded me about this XSLT Quick Reference from Mulberry Technologies. A very nice 2-page quick reference that can be printed and hung on the wall. And guess what: They have one for XSLT 2.0 also.

XSLT and XPATH 1.0 Quick Reference: http://www.mulberrytech.com/quickref/XSLT_1quickref-v2.pdf
XSLT 2.0 Quick Reference: http://www.mulberrytech.com/quickref/xslt2.pdf