I am new to Zend Framework and I have a question about something I am trying to do.
The main content of most pages of the application that I am working on will consist of 1 or more div elements that need to be styled the same.
Here is an example of the HTML that I want to generate:
<div id='admin-locations' class='panel'>
<header class="panel-header">
<h2>Locations</h2>
</header>
<div class='panel-content'>
<div id='locations-table' class='google-vis-table'></div>
<form id='locations'>
...
</form>
</div>
</div>
I know I can easily do this by pushing the form to my view script in my controller then adding this code to my controller.
<div id='admin-locations' class='panel'>
<header class="panel-header">
<h2>Locations</h2>
</header>
<div class='panel-content'>
<div id='locations-table' class="google_vis_table"></div>
<?php
echo $this->formLocations;
?>
</div>
</div>
But that is not DRY.
The example I used here has a Google Visualization Table and a Zend Form in it's content. Sometimes the panels will need to contain a form. Sometimes they won't, so I don't think form decorators are the way to go. So basically, the id of the panel, the panel header text and the content of div class='panel-content' need to be dynamic. Everything else will stay the same from panel to panel.
What is my best option here?