sitecore 6x

Custom your Sitecore shortcuts for better experience

It is fairly easy to make some custom shortcuts that makes a better editor experiance. This is a feature that goes long time back in Sitecore. And it takes a moment to set it up. It helps the editor not to do a lot of mouse click before the actual action can be done.

Example: How to add a shortcut that opens the publish window in the Content Editor.
To do that login to Sitecore backend as a administrator in Desktop Mode.
Then go to the Core Database by clicking on the database icon on the lower right and select the core database.

Then in Content Editor go to:
/sitecore/content/Applications/Content Editor/Ribbons/Chunks/Publish/Publish

 

Under the section Data on the node is a field named Key Code

The Key Code consist of a 4 digit hex code. To find the given code for a specific shortcut key combination. Then there is a small tool for that call Keyboard Map.

Keyboard Map is fould under:
(Remind to be in in Desktop Mode and as a Administrator)
Sitecore start icon -> Development Tool -> Keyboard Map



The shortcut can be prefixed with SHIFT, CTRL or ALT and a letter key or a combination of the them.
E.g. Here CTRL+SHIFT+P that give the Key Code ca80 that can be used for the shortcut for Publish the Item

Then the code is written into the field "Key Code" and then you can start using it.

Note: Be sure that you don't use a code that is used before!
Always check if the Key Code used by Sitecore or the browser in any languages

You might find help in looking at this article by John West about Sitecore mouse and keyboard shortcuts

Below is a list with some of the Sitecore shortcuts:

Alt+F1 - Shows or hides keyboard shortcuts for the current tab

Ctrl+S - Saves the current item

Ctrl+D - Duplicates the current item

F2 - Renames the current item

Ctrl+Shift+Alt+Up Arrow - Moves the current item after its previous sibling in the

sort order

Ctrl+Shift+Alt+Down Arrow - Moves the current item after its next sibling in the sort order

Ctrl+Shift+Alt+L - Protects (makes read-only) or unprotects the current item

Ctrl+Shift+Home - Navigates to the home item

Left Arrow - Collapses the branch

Right Arrow - Expands the branch

Ctrl+Shift+Alt+R - Shows or hides raw field values

Ctrl+Shift+Alt+T - Shows or hides fields from the standard template

Alt+H - Selects the Home tab

Alt+N - Selects the Navigate tab

Alt+R - Selects the Review tab

Alt+P - Selects the Publish tab

Alt+V - Selects the Versions tab

Alt+C - Selects the Configure tab

Alt+E - Selects the Presentation tab

Alt+S - Selects the Security tab

Alt+I - Selects the View tab

Domains, IIS, Sitecore and SEO

It is often that a site has more than just one domain, and maybe presented with both the prefix with www. and without.

And all the domains point to the same content. Especially if Sitecore is a multi site solution. 

For example:
mysite.com
www.mysite.com

mysite.net
www.mysite.net



Maybe even with a other related names like
www.myhomepage.com
and so on.

In the site setup section in Sitecore config file (SiteDefinition.config), the site section might look like this.
All the variant of the domains for the site is piped into hostname proberty.

<sites>
    <site name="mysite"
          hostname="mysite.com|www.mysite.com"
          patch:before="site[@name='website']"
          ...
/>
</sites>

 

To make it SEO let it have only one domain to handle and let the others point to it.

What domain is the right one?
Choose the shortest one or the one that is easiest to remember. 
Then desire if it should go with www. as prefix or not.

Let the IIS handle all the requests from the different domains before it hits Sitecore.
And let Sitecore have only one set.

<sites>
    <site name="mysite"
          hostname="www.mysite.com"
          patch:before="site[@name='website']"
          ...
/>
</sites>



That can be done easily with the Url rewrites
Make sure that it is installed on the IIS.

I have collected some rewrites that is good to have.

To add the prefix "www." and still keep the path:

<rewrite>
<rules>
<rule name="Add www." stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTP_HOST}" pattern="^www.domain.com$" ignoreCase="true" negate="true" />
</conditions>
<action type="Redirect" url="http://www.domain.com/{R:0}" />
</rule>
</rules>
</rewrite>

 

To remove the prefix "www." and keep the path:

<rewrite>
<rules>
<rule name="Remove www." stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTP_HOST}" pattern="^domain.com$" ignoreCase="true" negate="true" />
</conditions>
<action type="Redirect" url="http://domain.com/{R:0}" />
</rule>
</rules>
</rewrite>

 

To change the domain from one to the another and keep the path:

<rewrite>
<rules>
<rule name="From domain 1 to domain 2" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTP_HOST}" pattern="^www.domain1.com$" ignoreCase="true" negate="true" />
</conditions>
<action type="Redirect" url="http://www.domain2.com/{R:0}" />
</rule>
</rules>
</rewrite>

 

Force to HTTPS and keep the path:

<rewrite>
<rules>
<rule name="Force to HTTPS" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{HTTP_HOST}" pattern="off" ignoreCase="true" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:0}" redirectType="Found" />
</rule>
</rules>
</rewrite>

NB: Note that the attributes might differ for version to version of the IIS and URL Rewrite. And pattern might not work if "." is not escaped "\." 

Field and Help

How to help the editor with understanding the use of the fields on the templates

It is easy to help the editor with more understanding name and help text on the fields. More then the name on the field which often is shorten and not very understandeble from a editor pespectiv.

Each field on the template has a "Title" field under the Data section at the template for a more "saying name"
NB: Note that it is language visioned so if you have multiple language you can give it a title in each language.

This works also for section

If the title if the field is not helping enough then there are 3 more field to guide the editor in the use of a field. They can be found under the template at the Help section.

Help Link:
With the help link you can make a link internal or extern to a very details text of the field. This might be useful if there is a user manual for editor, in PDF or as a site.


Long description:
The long help text appears as a mouseover text on the title or in the tree at the node on the template for the title as a long description of the use of the field.





Short description:
The short help text appear after just after the title as a short description of the use of the field.