Sitecore – How to change the default item on the Content Editor view?

A common request I have seen while working with Sitecore, specially when it comes to multi-site implementation is how to change the default item on the Content Editor view.

It’s easy actually. First you need to know that by default the Home item is selected as shown bellow.

home

The start item is defined on the contentStartItem attribute of the shell site definition. This site definition can be found on the Sitecore.config file located under App_Config. By default the value is “/Home”:

<site name=”shell” rootPath=”/sitecore/content” contentStartItem=”/Home”

Using the example above let’s say that the item NewHome is the one I want to have selected when opening the content editor by default. To do that one might think “well I can just update the file on the Sitecore.config right”?

Yes. But not so fast. Don’t forget that if you go towards that path you will be breaking Sitecore’s upgrade path as this is defined on a Sitecore’s configuration file.  What I would suggest you to do is create a new configuration file and patch that property. If you need to upgrade Sitecore this doesn’t get lost on the upgrade process.

To patch that property just create a new configuration file under the App_Config/Include folder where you can patch that attribute as shown bellow:

newHome

That’s it. Open the content editor and you will notice that the default selected item has changed:

newhomeContentEditor

To see this post in portuguese click here

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s