/** * function prepareDisplayData * * Provided function to allow an object to prepare it's data for * displaying (actually done in the Page Object). */ function prepareDisplayData() { $cmsPage = new CMSPage($this->viewer); $cmsPage->loadPage($this->pageKey); $pageTitle = $cmsPage->getPageTitle($this->labels); $this->setPageTitle($pageTitle); $template =& new Template($this->moduleRootPath . 'templates/'); $template->setXML('CMSPage', $cmsPage->getXML()); $template->set('desiredZone', 'main'); $templateName = $cmsPage->getPageTemplateName(); if ($templateName != '') { $content = $template->fetch($templateName); } else { $content = ''; } // Finally store HTML content as this page's content Item $this->addContent($content); $template->set('desiredZone', 'side'); if ($templateName != '') { $content = $template->fetch($templateName); } else { $content = ''; } $this->addSideBarContent($content); $this->pageMenu->addLink('LinkName', 'LinkHREF'); }