Getting rid of the _cmsinternal in the site preview links from the channel manager - BloomReach Experience - Open Source CMS

This article covers a Hippo CMS version 11. There's an updated version available that covers our most recent release.

20-03-2017

Getting rid of the _cmsinternal in the site preview links from the channel manager

If and only if the CMS runs on a different hostname than the site(s), you can skip the _cmsinternal prefix. In that case, the CMS and sites do not share the same HTTP session, and therefore, we do not need to indicate in the URL that we are looking at a preview.

To skip the _cmsinternal prefix, you can set the hst:cmspreviewprefix property of the hst:hosts node to an empty String value. You can do this through bootstrapping (recommended for smoother upgrades) and/or directly in the CMS Console (for immediate effect). To bootstrap this change, add the following initializeitem to one of your project's  hippoecm-extension.xml files.

  <!-- set the hst:cmspreviewprefix to empty string
  this is possible because cms & site run on different host -->
  <sv:node sv:name="cear-cms-preview-prefix">
    <sv:property sv:name="jcr:primaryType" sv:type="Name">
      <sv:value>hippo:initializeitem</sv:value>
    </sv:property>
    <sv:property sv:name="hippo:contentpropset" sv:type="String">
      <sv:value/>
    </sv:property>
    <sv:property sv:name="hippo:contentroot" sv:type="String">
      <sv:value>/hst:hst/hst:hosts/hst:cmspreviewprefix</sv:value>
    </sv:property>
    <sv:property sv:name="hippo:sequence" sv:type="Double">
      <sv:value>20010.1</sv:value>
    </sv:property>
  </sv:node>
Did you find this page helpful?
How could this documentation serve you better?
On this page
    Did you find this page helpful?
    How could this documentation serve you better?