Exemplo n.º 1
0
 public function action_catalog()
 {
     $materials = new Model_Material('groups');
     //получаем url материала
     $materialID = $this->request->param('id');
     $material = $materials->getMaterial($materialID);
     $fields = $materials->getFields2($materialID, TRUE);
     $this->template->title = $material['name'];
     $this->template->page_title = $material['name'];
     $this->template->keywords = $material['keywords'];
     $this->template->description = $material['description'];
     $this->template->links = array('<link rel="canonical" href="' . Kohana::$base_url . 'catalog/' . $materialID . '.html"/>');
     $this->template->styles = Resources::load_styles();
     if (!$material['id']) {
         throw new HTTP_Exception_404();
     }
     //обновляем просмотры
     $materials->updateViews($material['id']);
     $widgets[] = Request::factory('widgets/material/index/' . $materialID)->execute();
     $this->template->block_center = $widgets;
 }
Exemplo n.º 2
0
<!--    --><?php 
//foreach ($links as $link):
?>
<!--        --><?php 
//=$link
?>
<!--    --><?php 
//endforeach
?>
    <title>
		<?php 
echo $title;
?>
	</title>
	<?php 
Resources::load_styles();
?>
	<!--[if IE]><link rel=stylesheet href=css/ie.css type=text/css media=all /><![endif]-->
</head>
<body>

<?php 
if (isset($top_menu)) {
    ?>
	<?php 
    foreach ($top_menu as $tmenu) {
        ?>
		<?php 
        echo $tmenu;
        ?>
	<?php