- Posts: 24
- Thank you received: 3
//JHtml::_('jquery.framework');
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Ты макет блога переделывал чтоб так выглядело или это стандартный макетВладимир wrote: Нет, все на чистом движке + пользовательские поля.
Please Log in or Create an account to join the conversation.
if($this->params->get('layout_type') && ($this->params->get('layout_type') != 'blog')):
echo $this->loadTemplate($this->params->get('layout_type'));
else:
echo $this->loadTemplate('default');
endif;
<?php defined('_JEXEC') or die;
// Create a shortcut for params.
$params = $this->item->params;
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
$canEdit = $this->item->params->get('access-edit');
$info = $params->get('info_block_position', 0);
$doc_title = (!empty($this->item->jcfields[2]))? $this->item->jcfields[2]->value : $this->item->title;
$doc_desc = $this->item->jcfields[3]->value;
$doc_url = JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language));
$doc_file = ($this->item->jcfields[8]->rawvalue) ? $this->item->jcfields[8]->rawvalue : $doc_url;
switch($this->item->jcfields[9]->rawvalue):
case 1:
$doc_filetype = "fa-file-pdf-o";
break;
case 2:
$doc_filetype = "fa-file-archive-o";
break;
case 3:
$doc_filetype = "fa-file-excel-o";
break;
default:
$doc_filetype = "fa-download";
break;
endswitch;
$img = json_decode($this->item->images,true);
?>
<?php if ($this->item->state == 0 || strtotime($this->item->publish_up) > strtotime(JFactory::getDate())
|| ((strtotime($this->item->publish_down) < strtotime(JFactory::getDate())) && $this->item->publish_down != JFactory::getDbo()->getNullDate())) : ?>
<div class="system-unpublished">
<?php endif; ?>
<?php if($this->item->images):
echo "<div class=\"col-md-1 download_item_list_image\">";
echo "<a href=\"".$doc_file."\" title=\"".$doc_title."\" target=\"_blank\"><img src=\"".$img['image_intro']."\" class=\"item_image thumbnail\" alt=\"".$doc_title."\"></a>";
echo "</div>";
endif;
echo "<div class=\"col-md-11 download_item_list_desc\">";
echo "<h2 class=\"title\" itemprop=\"name\">";
echo "<a href=\"".$doc_url."\" title=\"".$doc_title."\">".$this->item->title."</a>";
echo "</h2>";
echo "<p class=\"description\">".$doc_desc."</p>";
echo "<p class=\"item_buttons\"><a href=\"".$doc_url."\" class=\"btn podrobnosti\" itemprop=\"url\" title=\"Подробнее про ".$this->item->title."\">Подробнее</a> ";
echo "<a href=\"".$doc_file."\" title=\"Скачать ".$this->item->title." бесплатно\" class=\"btn btn-primary\" target=\"_blank\"><i class=\"fa ".$doc_filetype."\"></i> Скачать</a>";
echo "</p>";
echo "</div>";
?>
<?php // Todo Not that elegant would be nice to group the params ?>
<?php $useDefList = ($params->get('show_modify_date') || $params->get('show_publish_date') || $params->get('show_create_date')
|| $params->get('show_hits') || $params->get('show_category') || $params->get('show_parent_category') || $params->get('show_author') ); ?>
<?php if ($useDefList && ($info == 0 || $info == 2)) : ?>
<?php echo JLayoutHelper::render('joomla.content.info_block.block', array('item' => $this->item, 'params' => $params, 'position' => 'above')); ?>
<?php endif; ?>
<?php if ($useDefList && ($info == 1 || $info == 2)) : ?>
<?php echo JLayoutHelper::render('joomla.content.info_block.block', array('item' => $this->item, 'params' => $params, 'position' => 'below')); ?>
<?php endif; ?>
<?php if ($params->get('show_readmore') && $this->item->readmore) :
if ($params->get('access-view')) :
$link = JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language));
else :
$menu = JFactory::getApplication()->getMenu();
$active = $menu->getActive();
$itemId = $active->id;
$link1 = JRoute::_('index.php?option=com_users&view=login&Itemid=' . $itemId);
$returnURL = JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid, $this->item->language));
$link = new JUri($link1);
$link->setVar('return', base64_encode($returnURL));
endif; ?>
<?php echo JLayoutHelper::render('joomla.content.readmore', array('item' => $this->item, 'params' => $params, 'link' => $link)); ?>
<?php endif; ?>
<?php if ($this->item->state == 0 || strtotime($this->item->publish_up) > strtotime(JFactory::getDate())
|| ((strtotime($this->item->publish_down) < strtotime(JFactory::getDate())) && $this->item->publish_down != JFactory::getDbo()->getNullDate())) : ?>
</div>
<?php endif; ?>
<?php echo $this->item->event->afterDisplayContent; ?>
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Contact:
email: This email address is being protected from spambots. You need JavaScript enabled to view it.