public function action_index() { $id = $this->request->param('cat_alias'); $cat = ORM::factory('Category', $id); $suff = $cat->cat_title_en; $this->template->styles[] = 'media/css/' . $suff . '_plugin_style.css'; $plugin = Widget::load('Plugin' . $suff); $this->template->slider_plugin = $plugin; $products = $cat->products->find_all(); $examples = $cat->examples->limit(5)->find_all(); $wood_colors = Widget::load('WoodColors'); $glass_colors = Widget::load('GlassColors'); $content = View::factory('index/category/v_category'); $content->set('cat', $cat); $content->set('products', $products); $content->set('wood_colors', $wood_colors); $content->set('glass_colors', $glass_colors); $content->set('examples', $examples); $this->template->title = $cat->cat_title_ru; if ($cat->title_head) { $this->template->title_head = $cat->title_head; } if ($cat->seo_snippet) { $this->template->seo_snippet = $cat->seo_snippet; } if ($cat->keywords) { $this->template->keywords = $cat->keywords; } $this->template->content = $content; }
public function before() { parent::before(); if (!$this->auth->logged_in('admin')) { Controller::redirect('Auth'); } $menu_admin = Widget::load('menuadmin'); // Вывод в шаблон $this->template->site_name = null; $this->template->styles = array('media/css/style_adm_first.css'); $this->template->styles[] = 'media/css/style_admin.css'; $this->template->scripts = array('media/js/jquery-1.7.2.min.js'); $this->template->menu_admin = $menu_admin; $this->template->page_title = null; }
public function before() { parent::before(); $meniu_main = Widget::load('MainMeniu'); //Установка начальных настроек $setting = ORM::factory('Setting', 1); $this->template->seo_snippet = $setting->seo_snippet; $this->template->keywords = $setting->keywords; $this->template->title_head = $setting->main_head; $this->template->email = $setting->email; // подключаем стили и скрипты $this->template->styles = array('media/css/style.css'); $this->template->scripts = array('media/js/jquery-1.7.2.min.js', 'media/js/menu.js'); $this->template->meniu_main = $meniu_main; }
public function action_index() { $video = Widget::load('AboutVideo'); $data = ORM::factory('Page')->where('title_en', '=', 'about')->find(); $this->template->slider_plugin = $video; $content = View::factory('index/about/about'); $content->set('data', $data); $this->template->title = $data->title_ru; if ($data->title_head) { $this->template->title_head = $data->title_head; } if ($data->seo_snippet) { $this->template->seo_snippet = $data->seo_snippet; } if ($data->keywords) { $this->template->keywords = $data->keywords; } $this->template->content = $content; }
public function action_index() { $this->template->scripts[] = 'media/js/slider.js'; $data = ORM::factory('Page')->where('title_en', '=', 'main')->find(); $slider = Widget::load('Slider'); $this->template->slider_plugin = $slider; $news = Widget::load('News'); $adress = ORM::factory('Setting', 1)->main_adress; $content = View::factory('index/main/v_main'); $content->set('news', $news); $content->set('adress', $adress); $this->template->title = $data->title_ru; if ($data->title_head) { $this->template->title_head = $data->title_head; } if ($data->seo_snippet) { $this->template->seo_snippet = $data->seo_snippet; } if ($data->keywords) { $this->template->keywords = $data->keywords; } $this->template->content = $content; }
public function before() { parent::before(); $this->template->scripts = array('media/js/jquery-1.7.2.min.js', 'media/tinymce/tinymce.min.js', 'media/js/edit_tech.js'); $this->template->submenu = Widget::load('SubMenuMain'); }
<?php include 'header.php'; ?> <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main"> <h1 class="page-header">List Sessions</h1> <?php Widget::load('sessions'); ?> </div> </div> </div> <!-- Bootstrap core JavaScript ================================================== --> <!-- Placed at the end of the document so the pages load faster --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script>window.jQuery || document.write('<script src="../../assets/js/vendor/jquery.min.js"><\/script>')</script> <script src="js/bootstrap.min.js"></script> <!-- Just to make our placeholder images work. Don't actually copy the next line! --> <script src="js/holder.min.js"></script> <!-- IE10 viewport hack for Surface/desktop Windows 8 bug --> <script src="js/ie10-viewport-bug-workaround.js"></script> </body> </html> <?php include 'footer.php';
<?php if (Module::is_on('cms_shop')) { echo Widget::load('shop', 'nav'); } ?> <?php if (Module::is_on('cms_blog')) { echo Widget::load('blog', 'nav'); } ?> <?php if (Module::is_on('cms_publications')) { echo Widget::load('publications', 'nav'); } ?> <?php if (Module::is_on('cms_static')) { //echo Widget::load('static', 'nav'); } ?> <div id="content-cart-top" style="margin-top: 15px"> <?php echo View::factory('shop/frontend/cart/v_cart_top'); ?> </div>
public function load_widget($badge_tag) { $widget = new Widget($this->user_id); $widget->load($badge_tag); return $widget; }
/** * Get widget * * @param string $widgetname widget name (widgetname : find ./widgets folder, modulename/widgetname(using slash) : find ./modules/modulename/widgets folder) * @return object $widget */ function getWidget($widget) { $class = new Widget($this); return $class->load($widget); }
<?php if (Module::is_on('cms_shop')) { echo Widget::load('shop', 'recent'); } ?> <?php if (Module::is_on('cms_blog')) { echo Widget::load('blog', 'recent'); } ?> <?php if (Module::is_on('cms_publications')) { echo Widget::load('publications', 'recent'); } ?> </div> </div> </div> </div> <?php echo $v_footer; ?> <?php Assets::instance()->render(Assets::SCRIPTS);