Reputation: 65
i am learning a zend framework.i am using tinymce editor for displaying dynamic content on website.now i want to display page in which header and footer comes from layout and layout content comes from database table named cms..my whole page content is stored in database..header and footer page i included in layout.phtml.i dont know how to display that with layout my layout page is as below:
<?php echo $this->doctype() ?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="<?php echo CSS_PATH.'/jquery.jqplot.min.css';?>" />
<script src="<?php echo CSS_JS.'/jquery.ui.widget.mn.min.js';?>" type="text/javascript"></script>
<script src="<?php echo CSS_JS.'/jquery.effects.corin.js';?>" type="text/javascript"></script>
<script src="<?php echo CSS_JS.'/jquery.ui.accordioe.min.js';?>" type="text/javascript"></script>
<script src="<?php echo CSS_JS.'/jquery.effects.slide.min.js';?>" type="text/javascript"></script>
<script language="javascript" type="text/javascript" src="<?php echo CSS_JS.'/jqPlot/jquery.jqplot.min.js';?>"></script>
<script language="javascript" type="text/javascript" src="<?php echo CSS_JS.'/jqPlot/plugins/jqplot.barRenderer.min.js';?>"></script>
<script language="javascript" type="text/javascript" src="<?php echo CSS_JS.'/jqPlot/plugins/jqplot.pieRenderer.min.js';?>"></script>
<script language="javascript" type="text/javascript" src="<?php echo CSS_JS.'/jqPlot/plugins/jqplot.categoryAxisRenderer.min.js';?>"></script>
<script language="javascript" type="text/javascript" src="<?php echo CSS_JS.'/jqPlot/plugins/jqplot.highlighter.min.js';?>"></script>
<script language="javascript" type="text/javascript" src="<?php echo CSS_JS.'/jqPlot/plugins/jqplot.pointLabels.min.js';?>"></script>
<script src="<?php echo CSS_JS.'/setup.js';?>" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
setupDashboardChart('chart1');
setupLeftMenu();
setSidebarHeight();
});
</script>
</head>
<body>
</div>
<?php echo $this->render('header.phtml') ?>
<?php echo $this->layout()->content ?>
<?php echo $this->render('footer.phtml') ?>
</body>
</html>
and also when i echo content from database it display php code as it...please help
Upvotes: 0
Views: 1851
Reputation: 4998
The way you do this, is:
<textarea>
element in your view (actionName.phtml
)<textarea>
in the viewThese are the general steps to make it work.
Also, if I gather correctly, are you trying to keep PHP code in your DB? That is HIGHLY frowned upon, and should not be done, because for the code to be processed, it needs to be run through the eval
function, which just opens your site up wide to all sorts of bad behavior.
Upvotes: 1