I am building a cms on top of Zend, just to practice and for fun. I would like to be able to store the layout scripts and view scripts in the database, and retrieve them from there, so they are easily editable from within my CMS. Could someone point me in the right direction? What I do now is this:
// Disable view
$this->_helper->viewRenderer->setNoRender(true);
$this->_helper->layout()->disableLayout();
$pageDB = new Application_Model_DbTable_Page();
$page = $pageDB->fetch($identifier);
// Display the page or a 404 error
if ($page !== null) {
$this->view->headTitle($page->title);
// Get the layout from the DB
$layoutDB = new Application_Model_DbTable_Layout();
$layout = $layoutDB->fetch($page->layout);
$layout = str_replace('{LCMS:title}', $page->title, $layout->content);
$layout = str_replace('{LCMS:content}', $page->content, $layout);
$this->getResponse()->setBody($layout);
} else {
$this->_forward('notfound', 'error');
}
But this obviously means I lose all the advantages of Zend in rega