$this->toolboxContent = $this->_toolboxPage->getBody(
$this->_catid, $bodyFactory
);
-// echo '<pre>'.print_r($this->toolboxContent, true).'</pre>';exit;
$page = $this->_pageGateway->find($this->_catid);
$this->topParentId = $this->_pageGateway->findTopParent($this->_catid);
&& !filter_var($_REQUEST[ 'sitemap'], FILTER_VALIDATE_INT)
&& !isset($_REQUEST['query'])
) {
- $this->_getBlocks();
+ $this->_getBlocks($this->topParentId);
}
if ( defined("PRESS_DB")
* @return void
* @access private
*/
- private function _getBlocks()
+ private function _getBlocks($parentId)
{
+ if ($this->_catid == HOME_ID) {
+ $parentId = HOME_ID;
+ }
$cache = new Cache_Lite($GLOBALS['cacheOptions']);
- if ($blockContent = $cache->get($this->_catid, 'Block')) {
+ if ($blockContent = $cache->get($parentId, 'Block')) {
$this->headlines = unserialize($blockContent);
} else {
$blocks = new Toolkit_Blocks_Display(
Toolkit_Database::getInstance()
);
$this->headlines
- = $blocks->getPageBlocksAsArray((int)$this->_catid);
- $cache->save(serialize($this->headlines), $this->_catid, 'Block');
+ = $blocks->getPageBlocksAsArray((int)$parentId);
+ $cache->save(serialize($this->headlines), $parentId, 'Block');
}
$this->hasHeadlines = !empty($this->headlines);
}
<header class="row collapse">
<div class="small-12 columns">
<div class="logo left">
- <a href="{homePageURL:h}"><img src="{mediaBaseURL:h}assets/logo.png" alt="Keweenaw Peninsula - Michigan's Copper Country" /></a>
+ <a href="{homePageUrl:h}"><img src="{mediaBaseURL:h}assets/logo.png" alt="Keweenaw Peninsula - Michigan's Copper Country" /></a>
</div>
<ul class="right global-nav">
<li><a href="{homePageUrl:h}">Home</a></li>
<li><a href="{getToolboxUrl(#19#):h}">Contact</a></li>
</ul>
- <form class="right search" action="/" name="searchForm" method="get">
+ <form class="right search" action="{homePageUrl:h}" name="searchForm" method="get">
<input type="hidden" name="GLMSearch" value="true">
<input type="hidden" name="start" value="0">
<input type="hidden" name="rows" value="10">
<!-- /Nav Menus -->
<!-- Header -->
+ {if:headlines[0]}
<div class="row collapse header-content">
<div class="small-12 medium-7 columns header-image">
- <!--<img src="assets/mtn_biker.png" width="100%" />-->
+ <div class="center-image">
+ <img src="{headlines[0][img]:h}" />
+ </div>
</div>
<div class="small-12 medium-5 columns content">
- <h2>A World of Things to Do!</h2>
+ <h2>{headlines[0][header]}</h2>
<hr />
<p>
- Adventure through boreal forests long beaches of sands and magnificent rocks. Experience stunning sunrises and sunsets that will fill your eyes. See historic architecture, friendly villages and majestic panoramas. The wild is here, yet mixed with a culture of people who thrive in it.
+ {headlines[0][descr]:h}
</p>
<div class="north"></div>
+ <img src="{mediaBaseURL:h}assets/blue_berries.png" />
</div>
</div>
+ {end:}
{if:!isHomePage}
{if:toolboxContent.breadCrumbs}
{toolboxContent.breadCrumbs:h}
</div>
<!-- Bottom -->
+ {if:headlines[1]}
<div class="row collapse bottom-content" flexy:if="isHomePage">
<div class="small-12 medium-5 columns content">
- <h2>A World of Things to See!</h2>
+ <img src="{mediaBaseURL:h}assets/rasberries.png" />
+ <h2>{headlines[1][header]}</h2>
<hr />
<p>
- Seek your extreme adventure right here! Epic hikes and biking. Snowfall, ski hills and snowmobile and water trails everywhere. Lake Superior cliffs, mines and caves all waiting to be discovered and visit the hundreds of freshwater shipwrecks.
+ {headlines[1][descr]:h}
</p>
<div class="north"></div>
</div>
- <div class="small-12 medium-7 columns bottom-image"></div>
+ <div class="small-12 medium-7 columns bottom-image">
+ <div class="center-image">
+ <img src="{headlines[1][img]}" />
+ </div>
+ </div>
</div>
+ {end:}
<!-- Footer -->
<footer class="row collapse">