From: Steve Sutton Date: Mon, 18 Aug 2014 12:55:55 +0000 (-0400) Subject: Setup 41 as the default page block X-Git-Tag: V1.0^2~52 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=777f3d4fa8ab558312badd2c9d81506b8e7347ef;p=web%2FKeweenaw.git Setup 41 as the default page block For site-map and members only pages need default page for the blocks. using page 41 (about us) --- diff --git a/Toolkit/Page.php b/Toolkit/Page.php index 68844eb..f0f31bb 100755 --- a/Toolkit/Page.php +++ b/Toolkit/Page.php @@ -544,8 +544,6 @@ class Toolkit_Page if ( defined("GLM_BLOCKS") && GLM_BLOCKS - && !filter_var($_REQUEST[ 'sitemap'], FILTER_VALIDATE_INT) - && !isset($_REQUEST['query']) ) { $this->_getBlocks($this->topParentId); } @@ -903,8 +901,12 @@ class Toolkit_Page */ private function _getBlocks($parentId) { - if ($this->_catid == HOME_ID) { + if ($this->_catid == HOME_ID && $this->isHomePage) { $parentId = HOME_ID; + } else if (!$this->isHomePage + && in_array($this->_catid, array(HOME_ID, MEMBERS_CATEGORY)) + ) { + $parentId = DEFAULT_PAGE_BLOCK; } $cache = new Cache_Lite($GLOBALS['cacheOptions']); if ($blockContent = $cache->get($parentId, 'Block')) { diff --git a/Toolkit/Template/Page/SiteMap.php b/Toolkit/Template/Page/SiteMap.php index 392bd66..1fa4318 100644 --- a/Toolkit/Template/Page/SiteMap.php +++ b/Toolkit/Template/Page/SiteMap.php @@ -77,15 +77,14 @@ class Toolkit_Template_Page_SiteMap { $GLOBALS['styleSheets'][] = MEDIA_BASE_URL . 'css/siteMap.css'; $navArray = $this->getNavArray(0); - $tPage = new stdClass(); + $tPage = new stdClass(); $tpl = new HTML_Template_Flexy( $GLOBALS['flexyOptions'] ); $tPage->nav = $navArray; -// echo '
'.print_r($tPage, true).'
';exit; -// $tpl->compile('siteMap.html'); + //echo '
'.print_r($tPage, true).'
';exit; + //$tpl->compile('siteMap.html'); return $tPage; -// return $tpl->bufferedOutputObject($page); } // }}} diff --git a/setup.phtml b/setup.phtml index ce3c42a..97da28e 100644 --- a/setup.phtml +++ b/setup.phtml @@ -54,6 +54,7 @@ if (!isset($DEBUG)) { } $securePagesArray = array(); define('SECURE_PAGES', serialize($securePagesArray)); +define('DEFAULT_PAGE_BLOCK', 41); $mainNavigationUl = array( 'activities' => 2, 'attractions' => 7,