views:

65

answers:

3

I have a Sitecore solution with multiple sites. All sites are setup in SiteDefinition.Config, and i can enter all the sites correctly.

My problem is that the internal links on the sites (navigations etc.) prefixes 'sitecore/content/sitename/' to all my links.

i have tried almost all the fixes/solutions i could think off - but no luck.

Any ideas?

A: 

Is your

<setting name="Rendering.SiteResolving" value="true" />

set?

Mark Cassidy
Yes - it is set to true (default value)
kastru
A: 

It's possible your config requires this... otherwise the links could be ambiguous. Are you linking to items across sites?

Bryan
A: 

Are your site definitions setup to use different values for the rootPath attribute?

<site name="mysite1" rootPath="/sitecore/content/mysite1" startItem="/home" hostName="mysite1.com" ... />
<site name="mysite2" rootPath="/sitecore/content/mysite2" startItem="/home" hostName="mysite2.com" ... />
Krisc
Here's an example of a site.config:
kastru
<site name="sc_site" patch:before="site[@name='scheduler']" hostName="mydomain.com" virtualFolder="/" physicalFolder="/" rootPath="/sitecore/content/mysite" startItem="frontpage" language="en" device="Default" database="web" domain="extranet" allowDebug="true" cacheHtml="true" htmlCacheSize="10MB" enablePreview="true" enableWebEdit="true" enableDebugger="true" disableClientData="false">
kastru
See Bryan's question. Are you linking across sites? Do you see the same results if you write some code that uses LinkManager?
Krisc
I am linking across 'internal' sites, but the problem occurs in all links (navigation, where xsl is used, links inserted in RTE etc.
kastru
Had any usefull comments to this question yet? I'm having the same issue for some of our websites that use multiple site config with internal linking from one to another website.
Younes
Have you tried using a piece of code to generate a URL with the SiteResolving option on? Sitecore may not be attempting to resolve the site's url and thus is including the full content path. In general, I use a method or two to generate all the internal URLs for the Sitecore sites. It essentially boils down to `options.SiteResolving = true; return LinkManager.GetItemUrl(item, options);`
Krisc