1

This seems like a very simple config. Set the contentStartItem path that is below the rootPath. In this case it is the home item below the /sitecore/content/Sites/Client path.

When I log in as an editor, I land on the /Sitecore/Content/home item and not the /sitecore/content/Sites/Client/home item. I wonder if this functionality is broken in 9.1.

<site name="client" patch:after="site[@name='modules_website']"
      targetHostName="client.dev.local"
      hostName="client.dev.local"
      database="web"
      virtualFolder="/"
      physicalFolder="/"
      rootPath="/sitecore/content/Sites/Client"
      startItem="/home"
      contentStartItem="/home"
      domain="client"
      allowDebug="true"
      cacheHtml="true"
      htmlCacheSize="50MB"
      registryCacheSize="0"
      viewStateCacheSize="0"
      xslCacheSize="25MB"
      filteredItemsCacheSize="10MB"
      enablePreview="true"
      enableWebEdit="true"
      enableDebugger="true"
      disableClientData="false"
      cacheRenderingParameters="true"
      renderingParametersCacheSize="10MB"
      loginPage="/login"
      enableItemLanguageFallback="true" />
</sites>
2

contentStartItem site property is used when you open Content Editor this is the item which will be selected by default when you open it.

Sitecore reads site definitions in the order they appear in showconfig. In 99% cases, then first site will be shell site:

<site 
    name="shell"
    virtualFolder="/sitecore/shell" 
    physicalFolder="/sitecore/shell" 
    rootPath="/sitecore/content" 
    startItem="/home" 
    ...
/>

When you open Content Editor, the url is

/sitecore/shell/Applications/Content%20Editor.aspx?sc_bw=1

which matches the shell site.

If you have a config patch like:

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:set="http://www.sitecore.net/xmlconfig/set/">
  <sitecore>
    <sites>
      <site 
        name="shell" 
        contentStartItem="/Sites/Client/home"
        />
      </sites>
  </sitecore>
</configuration>

then every time you open Content Editor it will load /sitecore/content/Sites/Client/home initially.

  • You are exactly right with that patch. BUT I would expect that I could have a different contentStartItem for each site the user logs into. Doesn't seem very multi-site compliant. When I remove the contentStartItem from shell, doesn't fall through to the client site. When I move the client site above shell, well that causes all those problems. – Chris Auer Mar 9 at 16:38
  • I totally agree. It would be nice to view Content Editor in certain site context – Marek Musielak Mar 9 at 17:51
  • I've not tried, but I think it would be possible to make inherited "shell" sites, each with different contentStartItem settings, responding to their own hostName. After all, the Content Editor is just another site in the solution. – Mark Cassidy Mar 11 at 10:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.