February 20, 2011

Create a desktop shortcut to the core content editor

Here is a small tip to create a shortcut to the content editor of the core database that will be accessible even if you currently on the master database. This is very useful to not always switching between the databases.
  1. Switch to the core database
  2. Open the content editor
  3. Drag’n drop the sitecore element from the content editor to the desktop
  4. Right click on this new shortcut and change the name and the icon to personalize it
Enjoy

February 18, 2011

Set the root folder of the file Explorer

There is a very simple way to allow your user to upload (or download) some files from sitecore to a specific folder.

Follow these steps:
  1. Go to the core DB
  2. Duplicate  /sitecore/content/Documents and settings/All users/Start menu/Programs/File Explorer
  3. In the duplicated shorcut, edit the field "Parameters" and set the root folder. Example: "ro=\design\upload\modules"

    February 17, 2011

    Adding custom icons for the media library

    If you need to have some custom icons in the media library you have several options:
    • Install the corresponding program on the computer and associate the file with this program (ie: acrobat reader for .pdf files). This option is maybe not an option for the production server.
    • Associate the file extension in the operating system. Open "Control Panel -> Folder Options-> File Types -> New -> Add file Extension" then register the icon for this extension (Advanced -> Change Icon)
    • Associate the Icon with the file extension in your web.config. Add thumbnails generator for the known file type. For example for PDF file type:
      <mediaType name="PDF file" extensions="pdf">
        <mimeType>application/pdf</mimeType>
        <forceDownload>false</forceDownload>
        <sharedTemplate>system/media/unversioned/pdf</sharedTemplate>
        <versionedTemplate>system/media/versioned/pdf</versionedTemplate>
        <thumbnails>
          <generator type="Sitecore.Resources.Media.MediaThumbnailGenerator, Sitecore.Kernel">
            <extension>png</extension>
          </generator>
          <staticFile>Path where the icon is located. For example /sitecore/shell/Themes/standard/images/pdf_icon.png</staticFile>
        </thumbnails>
      </mediaType>
      

    After these modification, clear the cached files:
    1. Open the folder "/Temp" under the Sitecore root.
    2. Delete all files with the name "fileicon.....".
    3. Clear media cache "/App_Data/MediaCache" under the Sitecore root.

    February 16, 2011

    Use the dictionary en-GB in place of en-US

    We had a bug when we try to use the en-GB dictionary in place of the en-US. Effectively, the logical way is editing /sitecore/system/Languages/en and set the property “Dictionary” to en-US.tdf.

    But it doesn’t work, the bug fix is to use replace the en-US.tdf file by the en-GB.tdf file in the folder “\sitecore\shell\RadControls\Spell\TDF”.

    Here is the explanation of the sitecore support:
    When you are opening the RTE editor the current item language name is transferred there as the “la=xx-XX” URL parameter.

    This value is used for a spellchecking, i.e. if the current item language is “la-LA” then the “la-LA.tdf” dictionary will be used.

    However when the item language is “en“ - Telerik control automatically interprets this value as “en-US” and used the “en-US.tdf” dictionary file.

    Thus the only possible way to change the default dictionary for “en” items spellcheking is to rename the old “en-US.tdf” to something different and rename the “en-GB.tdf” file into “en-US.tdf”.