Category Archives: Sitecore

Sitecore Quick Tips – Device Fallback

I needed a print version of a page that was different enough to make using CSS print styles impractical, so I decided to use the Print device in Sitecore. I setup the Print device to detect the query string “p=1″, then setup the layout for the Print device.

Posted in Development, Sitecore | Leave a comment

Preventing Cross-Site Links in Sitecore

I have multiple sites setup in one Sitecore instance; and host names are used in the web.config “sites” section to manage this:

<site name=”site1″ hostName=”www.site1.com” rootPath=”/sitecore/content/site1″ … >
<site name=”site2″ hostName=”www.site2.com” rootPath=”/sitecore/content/site2″ … >

Posted in ASP.NET, Development, Sitecore | Leave a comment

Sitecore Media Security

I recently had a request to provide custom security for Sitecore media items.  Basically, I needed to provide a way to intercept the media requests, redirect to the login page (if needed), and redirect to an access denied page if the user did not have proper rights.

Posted in Development, Sitecore | Leave a comment

Sitecore Layouts and Code Blocks

One problem I recently ran into is that you cannot put ASP.NET code blocks in a Sitecore Layout.  The page will work perfectly fine in Content Editor and on the live site, but if you try to use Preview or Page Editor, you will see something like this:

Posted in .Net, Development, Sitecore | Leave a comment

Sitecore Include Files – Part 2

In an earlier blog post, I discussed using Sitecore include config files and gave some real world examples.  This post will highlight more features of include files and provide additional examples.

Posted in Administration, Configuration, Sitecore | Leave a comment

Sitecore Rich-Text Field Rendering and GUID Links

There are several situations where you might need to get the content of a Rich-Text field programmatically and display it on a page. You could have a field with branding text that is displayed on every page (in the header or footer), so you put it in a site-level configuration item and access it from every page. You could have a variable number of child items whose content needs to be displayed dynamically on the parent item.

Posted in Development, Sitecore | Leave a comment

Using the Sitecore Link Database

The Sitecore Link database has many uses.  If you are unfamiliar with the Link database, it stores references between Sitecore items.

A few examples include:

  • The template for an item
Posted in Administration, Development, Sitecore | Tagged , | Leave a comment

Sitecore Include Files – Part 1

Starting with Sitecore 6, settings in the configuration/sitecore section of the web.config can be placed in separate files under the App_Config\Include folder and they will be automatically merged at runtime.  You can check out this link on SDN or this link on Brian Pedersen’s blog for more information.  I won’t duplicate what is already posted, but I would like to provide additional information based on my experiences as well as some “real world” examples.

Posted in Administration, Configuration, Sitecore | 1 Comment