<?php } ?> <?php if (in_array('item', $this->params->get('social_code_views', array())) && $this->params->get('social_code_position', 'top') == 'top' && $this->params->get('social_code', '') != '') { ?> <div class="djc_clearfix djc_social_t"> <?php echo $this->params->get('social_code'); ?> </div> <?php } ?> <?php $this->item->images = DJCatalog2ImageHelper::getImages('item', $this->item->id); if ($this->item->images && (int) $this->params->get('show_image_item', 1) > 0) { echo $this->loadTemplate('images'); } ?> <h2 class="djc_title"> <?php if ($this->item->featured == 1) { echo '<img class="djc_featured_image" alt="' . JText::_('COM_DJCATALOG2_FEATURED_ITEM') . '" title="' . JText::_('COM_DJCATALOG2_FEATURED_ITEM') . '" src="' . DJCatalog2ThemeHelper::getThemeImage('featured.png') . '" />'; } ?> <?php if ((int) $this->params->get('fed_edit_button', 0) == 1 && $edit_auth) { ?> <a class="btn btn-primary btn-mini button djc_edit_button" href="<?php echo JRoute::_('index.php?option=com_djcatalog2&task=itemform.edit&id=' . $this->item->id);
protected function _prepareDocument() { $app = JFactory::getApplication(); $menus = $app->getMenu(); $pathway = $app->getPathway(); $title = null; $heading = null; $menu = $menus->getActive(); $cid = (int) @$menu->query['cid']; $pid = (int) @$menu->query['pid']; if ($menu) { $this->params->def('page_heading', $this->params->get('page_title', $menu->title)); } $title = $this->params->get('page_title', ''); $metakeys = null; $metadesc = null; if ($menu && ($menu->query['option'] != 'com_djcatalog2' || $menu->query['view'] != 'producer' || $pid != $this->item->id)) { if ($this->item->metatitle) { $title = $this->item->metatitle; } else { if ($this->item->name) { $title = $this->item->name; } } $path = array(array('title' => $this->item->name, 'link' => '')); foreach ($path as $item) { $pathway->addItem($item['title'], $item['link']); } } else { if (!empty($menu)) { if ($this->params->get('menu-meta_description')) { $metadesc = $this->params->get('menu-meta_description'); } if ($this->params->get('menu-meta_keywords')) { $metakeys = $this->params->get('menu-meta_keywords'); } } } if (empty($title)) { $title = $app->getCfg('sitename'); } elseif ($app->getCfg('sitename_pagetitles', 0)) { if ($app->getCfg('sitename_pagetitles', 0) == '2') { $title = JText::sprintf('JPAGETITLE', $title, $app->getCfg('sitename')); } else { $title = JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $title); } } $this->document->setTitle($title); foreach ($this->document->_links as $key => $headlink) { if ($headlink['relation'] == 'canonical') { unset($this->document->_links[$key]); } } $this->document->addHeadLink(JRoute::_(DJCatalogHelperRoute::getProducerRoute($this->item->prodslug)), 'canonical'); if (!empty($this->item->metadesc)) { $this->document->setDescription($this->item->metadesc); } elseif (!empty($metadesc)) { $this->document->setDescription($metadesc); } if (!empty($this->item->metakey)) { $this->document->setMetadata('keywords', $this->item->metakey); } elseif (!empty($metakeys)) { $this->document->setMetadata('keywords', $metakeys); } if ($this->params->get('robots')) { $this->document->setMetadata('robots', $this->params->get('robots')); } $this->document->addCustomTag('<meta property="og:title" content="' . trim($title) . '" />'); $this->document->addCustomTag('<meta property="og:url" content="' . JRoute::_(DJCatalogHelperRoute::getProducerRoute($this->item->id . ':' . $this->item->alias)) . '" />'); if ($item_images = DJCatalog2ImageHelper::getImages('producer', $this->item->id)) { if (isset($item_images[0])) { $this->document->addCustomTag('<meta property="og:image" content="' . $item_images[0]->large . '" />'); } } }
"> <?php if (in_array('producer', $this->params->get('social_code_views', array())) && $this->params->get('social_code_position', 'top') == 'top' && $this->params->get('social_code', '') != '') { ?> <div class="djc_clearfix djc_social_t"> <?php echo $this->params->get('social_code'); ?> </div> <?php } ?> <?php if ($this->item->images = DJCatalog2ImageHelper::getImages('producer', $this->item->id)) { echo $this->loadTemplate('images'); } ?> <h2 class="djc_title"><?php echo $this->item->name; ?> </h2> <?php if (in_array('producer', $this->params->get('social_code_views', array())) && $this->params->get('social_code_position', 'top') == 'aft_title' && $this->params->get('social_code', '') != '') { ?> <div class="djc_clearfix djc_social_at"> <?php echo $this->params->get('social_code'); ?>
protected function _prepareDocument() { $app = JFactory::getApplication(); $menus = $app->getMenu(); $pathway = $app->getPathway(); $title = null; $heading = null; $document = JFactory::getDocument(); $menu = $menus->getActive(); $id = (int) @$menu->query['id']; $cid = (int) @$menu->query['cid']; if ($menu) { $this->params->def('page_heading', $this->params->get('page_title', $menu->title)); } $title = $this->params->get('page_title', ''); $metakeys = null; $metadesc = null; if ($menu && ($menu->query['option'] != 'com_djcatalog2' || $menu->query['view'] == 'items' || $id != $this->item->id)) { if ($this->item->metatitle) { $title = $this->item->metatitle; } else { if ($this->item->name) { $title = $this->item->name; } } $category = $this->categories->get($this->item->cat_id); $path = array(array('title' => $this->item->name, 'link' => '')); while (($menu->query['option'] != 'com_djcatalog2' || $menu->query['view'] == 'items' && $cid != $category->id) && $category->id > 0) { $path[] = array('title' => $category->name, 'link' => DJCatalogHelperRoute::getCategoryRoute($category->catslug)); $category = $this->categories->get($category->parent_id); } $path = array_reverse($path); foreach ($path as $item) { $pathway->addItem($item['title'], $item['link']); } } else { if (!empty($menu)) { if ($this->params->get('menu-meta_description')) { $metadesc = $this->params->get('menu-meta_description'); } if ($this->params->get('menu-meta_keywords')) { $metakeys = $this->params->get('menu-meta_keywords'); } } } if (empty($title)) { $title = $app->getCfg('sitename'); } elseif ($app->getCfg('sitename_pagetitles', 0)) { if ($app->getCfg('sitename_pagetitles', 0) == '2') { $title = JText::sprintf('JPAGETITLE', $title, $app->getCfg('sitename')); } else { $title = JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $title); } } $this->document->setTitle($title); if (!empty($this->item->metadesc)) { $this->document->setDescription($this->item->metadesc); } elseif (!empty($metadesc)) { $this->document->setDescription($metadesc); } if (!empty($this->item->metakey)) { $this->document->setMetadata('keywords', $this->item->metakey); } elseif (!empty($metakeys)) { $this->document->setMetadata('keywords', $metakeys); } if ($this->params->get('robots')) { $this->document->setMetadata('robots', $this->params->get('robots')); } $this->document->addCustomTag('<meta property="og:title" content="' . trim($title) . '" />'); $this->document->addCustomTag('<meta property="twitter:title" content="' . trim($title) . '" />'); if ($metadesc) { $this->document->addCustomTag('<meta property="og:description" content="' . trim($metadesc) . '" />'); $this->document->addCustomTag('<meta property="twitter:description" content="' . trim($metadesc) . '" />'); } $this->document->addCustomTag('<meta property="og:url" content="' . JRoute::_(DJCatalogHelperRoute::getItemRoute($this->item->slug, $this->item->catslug), true, -1) . '" />'); if ($item_images = DJCatalog2ImageHelper::getImages('item', $this->item->id)) { if (isset($item_images[0])) { $this->document->addCustomTag('<meta property="og:image" content="' . $item_images[0]->large . '" />'); $this->document->addCustomTag('<meta property="twitter:image:src" content="' . $item_images[0]->large . '" />'); } } }
</th> <?php } ?> </tr> </thead> <tbody> <?php $k = 1; $itemsImages = array(); foreach ($this->children as $item) { $k = 1 - $k; if ($item->parent_id > 0) { if (!$item->item_image) { if (!isset($itemsImages[$item->parent_id])) { $itemsImages[$item->parent_id] = DJCatalog2ImageHelper::getImages('item', $item->parent_id); } if (!empty($itemsImages[$item->parent_id]) && isset($itemsImages[$item->parent_id][0])) { $item->item_image = $itemsImages[$item->parent_id][0]->fullname; $item->image_caption = $itemsImages[$item->parent_id][0]->caption; $item->image_path = $itemsImages[$item->parent_id][0]->path; $item->image_fullpath = $itemsImages[$item->parent_id][0]->fullpath; } } $item->slug = $item->parent_id . ':' . $item->alias; } $this->item_cursor = $item; ?> <tr class="cat-list-row<?php echo $k; ?>
protected function _prepareDocument() { $app = JFactory::getApplication(); $menus = $app->getMenu(); $pathway = $app->getPathway(); $title = null; $heading = null; $menu = $menus->getActive(); $id = (int) @$menu->query['cid']; $pid = $app->input->get('pid', null, 'string'); $limitstart = $app->input->get('limitstart', 0, 'int'); if ($menu) { $this->params->def('page_heading', $this->params->get('page_title', $menu->title)); } $title = $this->params->get('page_title', ''); $metakeys = null; $metadesc = null; if ($menu && ($menu->query['option'] != 'com_djcatalog2' || $menu->query['view'] != 'items' || $id != $this->item->id)) { if (!empty($this->item->metatitle)) { $title = $this->item->metatitle; } else { if ($this->item->name && $this->item->id > 0) { $title = $this->item->name; } } $path = array(); if ($this->item->id == 0) { //$path = array(array('title' => $title, 'link' => '')); } else { $path = array(array('title' => $this->item->name, 'link' => '')); } $category = $this->categories->get($this->item->parent_id); if ($category) { while (($menu->query['option'] != 'com_djcatalog2' || $menu->query['view'] == 'item' || $id != $category->id) && $category->id > 0) { $path[] = array('title' => $category->name, 'link' => DJCatalogHelperRoute::getCategoryRoute($category->catslug)); $category = $this->categories->get($category->parent_id); } } $path = array_reverse($path); foreach ($path as $item) { $pathway->addItem($item['title'], $item['link']); } } else { if (!empty($menu)) { if ($this->params->get('menu-meta_description')) { $metadesc = $this->params->get('menu-meta_description'); } if ($this->params->get('menu-meta_keywords')) { $metakeys = $this->params->get('menu-meta_keywords'); } } } if (empty($title)) { $title = $app->getCfg('sitename'); } elseif ($app->getCfg('sitename_pagetitles', 0)) { if ($app->getCfg('sitename_pagetitles', 0) == '2') { $title = JText::sprintf('JPAGETITLE', $title, $app->getCfg('sitename')); } else { $title = JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $title); } } $this->document->setTitle($title); $uri = JFactory::getURI(); $vars = $uri->getQuery(true); unset($vars['order']); unset($vars['dir']); unset($vars['l']); $canonical = DJCatalogHelperRoute::getCategoryRoute($this->item->catslug, $pid); /*if ($limitstart > 0) { $canonical .= '&limitstart='.$limitstart; }*/ if (!empty($vars)) { $canonical .= '&' . $uri->buildQuery($vars); } foreach ($this->document->_links as $key => $headlink) { if ($headlink['relation'] == 'canonical') { unset($this->document->_links[$key]); } } $this->document->addHeadLink(JRoute::_($canonical), 'canonical'); if (!empty($this->item->metadesc)) { $this->document->setDescription($this->item->metadesc); } elseif (!empty($metadesc)) { $this->document->setDescription($metadesc); } if (!empty($this->item->metakey)) { $this->document->setMetadata('keywords', $this->item->metakey); } elseif (!empty($metakeys)) { $this->document->setMetadata('keywords', $metakeys); } if ($app->input->get('filtering', false)) { $this->document->setMetadata('robots', 'noindex, follow'); } else { if ($this->params->get('robots')) { $this->document->setMetadata('robots', $this->params->get('robots')); } } $this->document->addCustomTag('<meta property="og:title" content="' . trim($title) . '" />'); $this->document->addCustomTag('<meta property="og:url" content="' . JRoute::_(DJCatalogHelperRoute::getCategoryRoute($this->item->catslug)) . '" />'); if ($item_images = DJCatalog2ImageHelper::getImages('category', $this->item->id)) { if (isset($item_images[0])) { $this->document->addCustomTag('<meta property="og:image" content="' . $item_images[0]->large . '" />'); //$this->document->setMetadata('og:image', $item_images[0]->large); } } if ($this->params->get('rss_enabled', '1') == '1') { $this->feedlink = JRoute::_(DJCatalogHelperRoute::getCategoryRoute($this->item->catslug, $pid) . '&format=feed&type=rss&limitstart=0'); //$link = '&format=feed&limitstart='; $attribs = array('type' => 'application/rss+xml', 'title' => 'RSS 2.0'); $this->document->addHeadLink(JRoute::_(DJCatalogHelperRoute::getCategoryRoute($this->item->catslug, $pid) . '&format=feed&type=rss'), 'alternate', 'rel', $attribs); $attribs = array('type' => 'application/atom+xml', 'title' => 'Atom 1.0'); $this->document->addHeadLink(JRoute::_(DJCatalogHelperRoute::getCategoryRoute($this->item->catslug, $pid) . '&format=feed&type=atom'), 'alternate', 'rel', $attribs); } }
if ($this->params->get('showcatdesc') && $this->item && $this->item->id > 0) { ?> <div class="djc_category djc_clearfix"> <?php if (in_array('category', $this->params->get('social_code_views', array())) && $this->params->get('social_code_position', 'top') == 'top' && $this->params->get('social_code', '') != '') { ?> <div class="djc_clearfix djc_social_t"> <?php echo $this->params->get('social_code'); ?> </div> <?php } ?> <?php $this->item->images = DJCatalog2ImageHelper::getImages('category', $this->item->id); if ((int) $this->params->get('showcatimg', 1) > 0 && $this->item->images) { echo $this->loadTemplate('images'); } ?> <h2 class="djc_title"> <?php echo $this->item->name; ?> <?php if (!empty($this->feedlink) && $this->params->get('rss_feed_icon', 0) == '1' && $this->params->get('rss_enabled', '1') == '1') { ?> <a class="djc_rss_link" href="<?php echo $this->feedlink; ?> "><img alt="RSS" src="<?php