As a relative n00b, I'm not sure this is optimised for pimcore way of doing things, but tell your templates to use a different layout file.
This is boilerplate code I took from docs, and inserted a new parent doc node id (6) from which the nav should be generated. (ie the doc which is nominated as being the home page in my case 6)
subsite-layout.php
- Code: Select all
<?php
// get root node if there is no document defined (for pages which are routed directly through static route)
if(!$this->document instanceof Document_Page) {
$this->document = Document::getById(6);
}
// get the document which should be used to start in navigation | default home
$navStartNode = $this->document->getProperty("navigationRoot");
if(!$navStartNode instanceof Document_Page) {
$navStartNode = Document::getById(6);
}
//this is used as id prefix for the html menu element
$htmlIdPrefix = "mainNav_";
$navigation = $this->pimcoreNavigation()->getNavigation($this->document, $navStartNode,
$htmlIdPrefix);
$this->navigation()->menu()->setUseTranslator(false); // to deactivate the translator provided by the view helper
$this->navigation($navigation);
?>
<?php $this->template('includes/subsite-head.php') ?>
<body>
<h1>SUB-SITE LAYOUT</h1>
<?php
echo $this->navigation()->menu()->renderMenu($navigation, array("maxDepth" => 0));
?>
<!-- BREADCRUMBS -->
<div>
<a href="/">Sub-site Home</a> >
<?php echo $this->navigation()->breadcrumbs()->setMinDepth(null); ?>
</div>
<?php echo $this->layout()->content ?>
(replace `subsite` with the name of your second site, obviously)
This came from another thread I found on here, cannot say where.
Hopefully if I am wrong someone will put us both right.
