Пример #1
0
 public function _show()
 {
     $oCategories = model_categories::getInstance()->findById(module_categories::getParam('id'));
     $oView = new _view('categories::show');
     $oView->oCategories = $oCategories;
     return $oView;
 }
Пример #2
0
 public function before()
 {
     $this->oLayout = new _layout('template1');
     //instancier le module
     $oModuleCategories = new module_categories();
     //recupere la vue du module
     $oView = $oModuleCategories->_index();
     //assigner la vue retournee a votre layout
     $this->oLayout->add('sidebar', $oView);
     //posts (main)
     $oModuleExamplemodule = new module_posts();
     //recupere la vue du module
     $oViewModule = $oModuleExamplemodule->_lastList();
     //assigner la vue retournee a votre layout
     $this->oLayout->add('sidebar', $oViewModule);
 }
Пример #3
0
	<tr>
		<th>name</th>
		<td><?php 
echo $this->oCategories->name;
?>
</td>
	</tr>

	<tr>
		<th>slug</th>
		<td><?php 
echo $this->oCategories->slug;
?>
</td>
	</tr>

	<tr>
		<th>post_count</th>
		<td><?php 
echo $this->oCategories->post_count;
?>
</td>
	</tr>

</table>
<p><a href="<?php 
echo module_categories::getLink('list');
?>
">Retour</a></p>