Just a quick note on patching the linkmanager in Sitecore. We have had some problems when trying to do the normal patching of the linkManager element in web.config, so i contacted support, for a solution.
The default in web.config looks like this:
<linkManager defaultProvider="sitecore">
<providers>
<clear />
<add name="sitecore"
type="Sitecore.Links.LinkProvider, Sitecore.Kernel"
addAspxExtension="true"
alwaysIncludeServerUrl="false"
encodeNames="true"
languageEmbedding="asNeeded"
languageLocation="filePath"
shortenUrls="true"
useDisplayName="false" />
</providers>
</linkManager>
What we wanted to solve, was just to change a few of the default properties on the linkManager element in web.config, like addAspxExtension, and languageEmbeddig. Our company’s best practice for changing values in web.config is to patch it though a config file in the include folder. So the way to do this is to override the attribute defaultProvider to a custom one.
This is done by placing the following in a config file that’s placed in the include folder, i.e. linkmanager.config
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<linkManager>
<patch:attribute name="defaultProvider">custom</patch:attribute>
<providers>
<clear />
<add name="custom"
type="Sitecore.Links.LinkProvider, Sitecore.Kernel"
addAspxExtension="false"
alwaysIncludeServerUrl="false"
encodeNames="true"
languageEmbedding="never"
languageLocation="filePath"
shortenUrls="true"
useDisplayName="false" />
</providers>
</linkManager>
</sitecore>
</configuration>
Thats is, happy coding