public function before() { $this->ttl = 3600; $template = $this->template; $this->template = NULL; parent::before(); if ($this->auto_render === TRUE) { $this->template = View_Theme::factory($template); } $this->config = Kohana::$config->load($this->config)->as_array(); $this->assets = '/assets/' . $this->config['theme'] . '/'; $this->template->page = URL::site(rawurldecode(Request::$initial->uri())); $this->template->code = $this->request->action(); $this->template->message = ''; // Internal request only! if (Request::$initial !== Request::$current) { // Скрываем, т.к. выводится лишняя информация // if ($message = rawurldecode( $this->request->param('message') )) // { // $this->template->message = $message; // } } else { $this->request->action(404); } if ($this->request->initial()->is_ajax() === TRUE) { $this->response->status((int) $this->request->action()); $this->response->body(isset($message) ? $message : 'Page not found'); } }
public function action_categories() { $list = array(); $page = Page_Route::page_by_alias('news'); if (!empty($page)) { $news_category = new News_Category(); $list = $news_category->get_list($page['id']); } $this->template = View_Theme::factory('widgets/template/news/categories', array('list' => $list, 'page' => $page)); }
<div class="four columns"> <?php $title = Arr::path($data, 'Title.value'); $text = Arr::path($data, 'Text.value'); if (!empty($title) and !empty($text)) { ?> <div class="widget margin-top-0"> <h3 class="headline"><?php echo $title; ?> </h3><span class="line"></span><div class="clearfix"></div> <?php echo $text; ?> </div> <?php } else { ?> <div class="widget margin-bottom-collapse-30"></div> <?php } echo View_Theme::factory('widgets/embed/news/categories'); echo View_Theme::factory('widgets/embed/catalog/news'); ?> <br> <br> </div>
echo $bg_color; ?> " data-opacity="<?php echo $opacity; ?> " data-height="<?php echo $height; ?> "> <?php if (!empty($image_1920)) { echo HTML::image($image_1920, array('alt' => $title)); } ?> <div class="parallax-overlay"></div> <div class="parallax-content"> <?php echo '<h2>', HTML::chars($title); if (!empty($description)) { echo ' <span>', HTML::chars($description), '</span>'; } echo '</h2>'; echo View_Theme::factory('layout/breadcrumbs'); ?> </div> </section> <script type="text/javascript"> s.initList.push('initParallaxTitlebar'); </script>
<?php defined('SYSPATH') or die('No direct script access.'); ?> <div class="container product-categories"> <?php echo View_Theme::factory('modules/catalog/list/category/items', array('list_categories' => $list_categories)); ?> </div>
</span> </header> <?php if (!empty($_orm->announcement)) { echo '<p>', $_orm->announcement, '</p>'; } ?> <a href="<?php echo $_link; ?> " class="button color">Узнать больше</a> </section> </article> <?php } ?> <div class="clearfix"></div> <?php $link = URL::base() . Page_Route::uri($PAGE_ID, 'news'); echo $paginator->render($link); ?> </div> </div> <?php echo View_Theme::factory('modules/news/sidebar', array('data' => Arr::path($properties, 'TextBlock.value'))); ?> </div>
</title> <?php echo View_Theme::factory('layout/head/tag'); ?> <script> var s = {}; s.initList = []; s.siteName = "<?php echo $SITE['name']; ?> "; </script> </head> <body> <?php echo View_Theme::factory('layout/menu/main', array('menu' => $menu)); echo $content; ?> <script src="<?php echo $ASSETS; ?> js/plugins/jquery-1.11.3.min.js"></script> <script src="<?php echo $ASSETS; ?> js/plugins/tmpl.js"></script> <script src="<?php echo $ASSETS; ?> js/site.core.js"></script>
echo HTML::chars($orm->title); ?> </h1> <small><?php echo __('Article'), ': ', $orm->code; ?> </small> </section> <?php echo View_Theme::factory('modules/catalog/detail/price', array('orm' => $orm, 'nomenclature' => $nomenclature)); if (!empty($orm->announcement)) { echo '<section>', $orm->announcement, '</section>'; } ?> </div> </div> </div> <?php echo View_Theme::factory('modules/catalog/detail/description', array('orm' => $orm, 'properties' => $properties)); ?> <div class="container"> <div class="sixteen columns"> <?php echo HTML::anchor($list_link, __('To the product list'), array('class' => 'button dark product-list-button')); ?> </div> </div> <?php echo View_Theme::factory('widgets/embed/catalog/related', array('exclude' => $orm->id, 'category' => $CATEGORY->id));
<div class="cart-btns"> <a href="checkout-billing-details.html" class="button color cart-btns proceed"><?php echo __('Proceed to Checkout'); ?> </a> <a href="#" class="button gray cart-btns"><?php echo __('Update Cart'); ?> </a> </div> </th> </tr> </table> </div> <?php echo View_Theme::factory('modules/catalog/basket/list/totals'); ?> </div> <script> s.initList.push("initBasketPage"); </script>
</a> <nav id="navigation"> <ul class="menu" id="responsive"> <?php $tpl = ' <li class="{class}"> {anchor} {sub} </li> '; $home_link = HTML::anchor($url_base, __('Home page'), array('class' => 'homepage' . ($is_home ? ' current' : ''))); echo str_replace(array('{class}', '{anchor}', '{sub}'), array(FALSE, $home_link, FALSE), $tpl); foreach ($menu as $_item) { $_class = empty($_item['sub']) ? FALSE : 'dropdown'; if (!empty($_item['megamenu'])) { $_sub = View_Theme::factory('layout/menu/header/megamenu', array('megamenu' => $_item['megamenu'])); } elseif (!empty($_item['sub'])) { $_sub = ''; foreach ($_item['sub'] as $_i) { $_a = HTML::anchor($_i['uri'], $_i['title'], array('class' => strpos($current_uri, $_i['uri']) === 0 ? 'current' : '')); $_sub .= str_replace(array('{class}', '{anchor}', '{sub}'), array(FALSE, $_a, FALSE), $tpl); } $_sub = '<ul>' . $_sub . '</ul>'; } else { $_sub = FALSE; } $_anchor = HTML::anchor($_item['uri'], $_item['title'], array('class' => strpos($current_uri, $_item['uri']) === 0 ? 'current' : '')); echo str_replace(array('{class}', '{anchor}', '{sub}'), array($_class, $_anchor, $_sub), $tpl); } ?> </ul>
<?php defined('SYSPATH') or die('No direct script access.'); if (Arr::path($properties, 'Paralax.value.Image_1920.value')) { echo View_Theme::factory('layout/titlebar/parallax', array('properties' => $properties, 'title' => $titlebar_title)); } else { echo View_Theme::factory('layout/titlebar/default', array('title' => $titlebar_title)); } $thumb_no_img = URL::base() . Thumb::uri('list_80x80_no_img', $NO_IMG); $currency = 'руб.'; $delivery = Kohana::$config->load('catalog.order.delivery.courier'); ?> <div id="js-form-container" class="container"> <?php echo View_Theme::factory('modules/catalog/order/list/form', array('labels' => $labels)); ?> <div class="eight columns"> <div class="checkout-section cart"><?php echo __('Basket'); ?> </div> <table id="js-basket-list" class="checkout cart-table responsive-table"> <thead> <tr> <th class="hide-on-mobile"></th> <th></th> <th><?php echo __('Price'); ?> (<?php echo $currency;
if (!empty($list_categories)) { ?> <div class="container product-categories"> <?php echo View_Theme::factory('modules/catalog/list/category/items', array('list_categories' => $list_categories)); ?> </div> <?php } if (!empty($list)) { ?> <div class="container"> <div class="four columns"> <?php echo View_Theme::factory('widgets/embed/catalog/categories'); // echo View_Theme::factory('widgets/embed/catalog/price'); ?> </div> <?php // echo View_Theme::factory('modules/catalog/list/orderby'); ?> <div class="twelve columns products"> <?php $detail_tpl = URL::base() . Page_Route::uri($PAGE_ID, 'catalog_element', array('element_uri' => '{ELEMENT_URI}', 'element_id' => '{ELEMENT_ID}')); $orm_helper = ORM_Helper::factory('catalog_Element'); foreach ($list as $_orm) { $_link = str_replace(array('{ELEMENT_URI}', '{ELEMENT_ID}'), array($_orm->uri, $_orm->id), $detail_tpl); $_thumb_1 = NULL; if (!empty($_orm->image_1)) {
protected function layout_render() { $this->template = View_Theme::factory($this->layout, $this->layout_data()); }
<?php defined('SYSPATH') or die('No direct script access.'); echo View_Theme::factory('widgets/embed/catalog/favorite');
echo URL::base(), $thumb; ?> ' /> <div class="qtyminus"></div> <input type='text' name="quantity" value='1' class="qty" /> <div class="qtyplus"></div> </form> <?php echo HTML::anchor('#', __('Add to Cart'), array('class' => 'button dark adc js-add-to-cart')); ?> <div class="clearfix"></div> </section> <?php echo View_Theme::factory('layout/share', array('page_id' => 'catalog:element:' . $orm->id)); ?> <div class="clearfix"></div> <div class="loader">Loading</div> </section> <?php $labels = array('duvet_cover' => __('DuvetCover'), 'bedsheet' => __('Bedsheet'), 'pillowslip' => __('Pillowslip')); ?> <script> s.initList.push(function(context){ var data = <?php echo json_encode($nomenclature); ?> ; var labels = <?php
echo View_Theme::factory('layout/titlebar/default', array('title' => $titlebar_title)); } if (!empty($orm->text)) { ?> <div class="container"> <div class="sixteen columns"><?php echo $orm->text; ?> </div> </div> <?php } ?> <div class="container"> <?php echo View_Theme::factory('modules/feedback/aside', array('feedback_properties' => $feedback_properties)); if ($form_orm->loaded()) { ?> <div class="twelve columns"> <div class="extra-padding left"> <h3 class="headline"><?php echo HTML::chars($form_orm->title); ?> </h3> <span class="line margin-bottom-25"></span> <div class="clearfix"></div> <?php if (!empty($form_orm->text) and $form_orm->text_show_top) { echo $form_orm->text; } ?>
defined('SYSPATH') or die('No direct script access.'); ?> <div class="container"> <div class="sixteen columns"> <ul class="tabs-nav"> <?php echo '<li>', HTML::anchor('#tab-properties', __('Product features')), '</li>'; if (!empty($orm->text)) { echo '<li>', HTML::anchor('#tab-text', __('Description')), '</li>'; } // echo '<li>', HTML::anchor('#tab-reviews', __('Reviews').' <span class="tab-reviews">(0)</span>'), '</li>'; ?> </ul> <div class="tabs-container"> <?php echo View_Theme::factory('modules/catalog/detail/tab/properties', array('properties' => $properties)); if (!empty($orm->text)) { echo '<div class="tab-content" id="tab-text">', $orm->text, '</div>'; } // echo View_Theme::factory('modules/catalog/detail/tab/reviews'); ?> </div> </div> </div> <script type="text/javascript"> s.initList.push('initProductTabs'); </script>
public function render($link, $options = array()) { $paginator = $this->get($link); $tpl = View_Theme::factory($this->_template)->set('paginator', $paginator)->set('options', $options); if (!empty($options['get_array'])) { $tpl->set('pagination_array', $this->_get_array($paginator, $options)); } return $tpl->render(); }
<?php defined('SYSPATH') or die('No direct script access.'); echo '<div class="six columns">', View_Theme::factory('layout/social'), '</div>';
public function action_columns() { $this->template = View_Theme::factory('widgets/shop/columns'); }
?> scripts/plugins/puregrid.js"></script> <script src="<?php echo $ASSETS; ?> scripts/plugins/stacktable.js"></script> <script src="<?php echo $ASSETS; ?> scripts/plugins/formatMoney.js"></script> <script src="<?php echo $ASSETS; ?> scripts/plugins/tmpl.js"></script> <script src="<?php echo $ASSETS; ?> scripts/reCaptcha.js"></script> <script src="<?php echo $ASSETS; ?> scripts/main.js?v=2"></script> <?php if (Kohana::$environment === Kohana::PRODUCTION) { echo View_Theme::factory('counters/yandex'); } ?> <div class="notification-queue"></div> </body> </html>
<?php defined('SYSPATH') or die('No direct script access.'); if (Arr::path($properties, 'Paralax.value.Image_1920.value')) { echo View_Theme::factory('layout/titlebar/parallax', array('properties' => $properties, 'title' => $titlebar_title)); } else { echo View_Theme::factory('layout/titlebar/default', array('title' => $titlebar_title)); } ?> <div class="container"> <div class="sixteen columns"> <h1 class="headline"><?php echo HTML::chars($orm->title); ?> </h1><span class="line margin-bottom-30"></span><div class="clearfix"></div> </div> <?php if (strpos($orm->text, '<div') === FALSE) { echo '<div class="sixteen columns">', $orm->text, '</div>'; } else { echo $orm->text; } ?> </div>