<?php defined('SYSPATH') or die('No direct script access.'); $titlebar_title = Arr::get($properties['Title'], 'value'); if (empty($titlebar_title)) { $titlebar_title = $CATEGORY->title; } 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)); } $item = end($BREADCRUMBS); $category_uri = str_replace(URL::base() . Page_Route::uri($PAGE_ID, 'catalog'), '', Arr::get($item, 'link')); $list_link = Page_Route::uri($PAGE_ID, 'catalog', array('category_uri' => $category_uri)); ?> <div class="container"> <div class="eight columns"> <?php echo View_Theme::factory('modules/catalog/detail/images', array('list' => $images)); // echo HTML::anchor($list_link, __('To the product list'), array( // 'class' => 'button product-list-button', // )); ?> </div> <div class="eight columns"> <div class="product-page"> <section class="title"> <h1><?php echo HTML::chars($orm->title);
private function _staff_items($page) { $return = array(); $url_base = $this->domain . URL::base(); $return[] = $this->_page_item($page); $categories_uri = array(); $category_link_tpl = $url_base . Page_Route::uri($page['id'], 'staff', array('category_uri' => '{category_uri}')); $item_link_tpl = $url_base . Page_Route::uri($page['id'], 'staff', array('category_uri' => '{category_uri}', 'name' => '{name}')); $_code = $this->site_code == 'moscow' ? '' : $this->site_code; $category_link_tpl = Route::set_region($category_link_tpl, $_code); $item_link_tpl = Route::set_region($item_link_tpl, $_code); $db_categories = ORM::factory('staff_Category')->exclude_hidden_elements($this->site_id == $this->site_id_master)->find_all(); foreach ($db_categories as $_item) { $categories_uri[$_item->id] = $_item->uri; if ($_item->page_id == $page['id'] and $_item->site_id == $page['site_id']) { $return[] = array('loc' => str_replace('{category_uri}', $_item->uri, $category_link_tpl), 'changefreq' => $page['sm_changefreq'], 'priority' => $page['sm_priority']); } } $db_staff = ORM::factory('staff')->where('site_id', '=', $this->site_id)->and_where('page_id', '=', $page['id'])->find_all(); $stop = $db_staff->count() <= 0; while (!$stop) { $_item = $db_staff->current(); $stop = $_item == FALSE ? TRUE : FALSE; if ($_item != FALSE) { $_category_uri = Arr::get($categories_uri, $_item->category_id); if ($_category_uri == NULL) { $db_staff->next(); continue; } $_last_mod = $_item->updated == '0000-00-00 00:00:00' ? $_item->created : $_item->updated; $return[] = array('loc' => str_replace(array('{category_uri}', '{name}'), array($_category_uri, $_item->uri), $item_link_tpl), 'lastmod' => $_last_mod, 'changefreq' => $page['sm_changefreq'], 'priority' => $page['sm_priority']); } $db_staff->next(); } return $return; }
$page = Page_Route::page_by_alias('catalog'); if (empty($page) or empty($list)) { return; } ?> <div class="container"> <div class="sixteen columns"> <h3 class="headline"><?php echo __('Best deals'); ?> </h3> <span class="line margin-bottom-0"></span> </div> <div class="sixteen columns products" style="margin-left: 0;"> <?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)) { $_src = $orm_helper->file_uri('image_1', $_orm->image_1); $_thumb_1 = Thumb::uri('list_420x535', $_src); unset($_src); } else { $_thumb_1 = Thumb::uri('list_420x535_no_img', $NO_IMG); } $_thumb_2 = NULL; if (!empty($_orm->image_2)) { $_src = $orm_helper->file_uri('image_2', $_orm->image_2); $_thumb_2 = Thumb::uri('list_420x535', $_src);
</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>
<?php defined('SYSPATH') or die('No direct script access.'); $list_tpl = URL::base() . Page_Route::uri($PAGE_ID, 'catalog', array('category_uri' => $CATEGORY->uri)); /* * FIXME $list_tpl */ $orm_helper = ORM_Helper::factory('catalog_Category'); foreach ($list_categories as $_orm) { $_link = $list_tpl . '/' . $_orm->uri; if (!empty($_orm->image)) { $_src = $orm_helper->file_uri('image', $_orm->image); $_thumb = Thumb::uri('list_420x420', $_src); } else { $_thumb = Thumb::uri('list_420x420_no_img', $NO_IMG); } ?> <div class="four columns"> <a href="<?php echo $_link; ?> " class="img-caption" > <figure> <?php echo HTML::image($_thumb, array('alt' => $_orm->title)); ?> <figcaption> <h3><?php echo HTML::chars($_orm->title);
if (!empty($form_orm->text) and $form_orm->text_show_top) { echo $form_orm->text; } ?> <section id="contact"> <div id="result"> <div class="success"><?php echo __('Thank you for your message!'); ?> </div> </div> <form method="post" name="contactform" id="contactform"> <fieldset> <?php $action = URL::base() . Page_Route::uri($PAGE_ID, 'feedback'); $g_recaptcha = Kohana::$config->load('g-recaptcha'); $supported_types = array('text', 'textarea'); foreach ($form_fields as $_field) { if (!in_array($_field['type'], $supported_types)) { continue; } $_id = uniqid(); $_name = "field_{$_field['id']}"; echo '<div><label for="', $_id, '">', HTML::chars($_field['title']); $_required = 'false'; if ($_field['required']) { echo '<span>*</span>'; $_required = 'true'; } echo '</label>';
echo __('Article'), ': ', $_orm->code; ?> </small> </section> </a> </figure> </div> <?php } ?> <div class="clearfix"></div> <?php $request = Request::current(); $query_array = array(); $filter_array = $request->query('filter'); if (!empty($filter_array)) { $query_array['filter'] = $filter_array; } $order = $request->query('order'); if (!empty($order)) { $query_array['order'] = $order; } $category_uri = Request::current()->param('category_uri'); $link = URL::base() . Page_Route::uri($PAGE_ID, 'catalog', array('category_uri' => implode('/', array_reverse($category_uri)), 'query' => Helper_Page::make_query_string($query_array))); echo $paginator->render($link); ?> </div> </div> <?php }
<span class="month"><?php echo __(date('M', $public_ts)); ?> </span> </section> <section class="post-content"> <header class="meta"> <h1><?php echo HTML::chars($orm->title); ?> </h1> <span> <i class="fa fa-caret-right"></i> <?php echo HTML::anchor(Page_Route::uri($PAGE_ID, 'news', array('category_uri' => $orm->category->uri)), $orm->category->title); ?> </span> </header> <?php echo $orm->text; echo View_Theme::factory('layout/share', array('page_id' => 'news:element:' . $orm->id)); ?> <div class="clearfix"></div> </section> </article> </div> </div> <?php echo View_Theme::factory('modules/news/sidebar', array('data' => Arr::path($properties, 'TextBlock.value')));
<?php defined('SYSPATH') or die('No direct script access.'); if (empty($list) or count($list) < 2) { return; } ?> <div class="widget"> <h3 class="headline"><?php echo __('Categories'); ?> </h3><span class="line"></span><div class="clearfix"></div> <nav class="categories"> <ul> <?php $link_tpl = URL::base() . Page_Route::uri($page['id'], 'news', array('category_uri' => '{uri}')); foreach ($list as $_orm) { echo '<li>', HTML::anchor(str_replace('{uri}', $_orm->uri, $link_tpl), $_orm->title), '</li>'; } echo '<li>', HTML::anchor(URL::base() . Page_Route::uri($page['id'], 'news'), __('All categories')), '</li>'; ?> </ul> </nav> </div>
private function _get_category($id) { $result = NULL; $catalog_category = new Catalog_Category(); $path = $catalog_category->get_path($id); $list = array(); $category_uri = URL::base() . Page_Route::uri($this->page_id, 'catalog'); do { $result = current($path); $category_uri .= '/' . $result->uri; $this->breadcrumbs[] = array('title' => $result->title, 'link' => $category_uri); } while (next($path)); return $result; }