
Best Answer Cheren-dow , 21 March 2014 - 09:48
Evgen, доброго времени суток.
Откройте файл
сайт\jbuikit.tets\media\zoo\applications\jbuniversal\elements\jbimage\jbimage.php
внутри метода _render
public function _render($params = array()){ ..... }
найдите следующие строки
if ($image && $layout = $this->getLayout('jbimage-' . $template . '.php')) { return $this->renderLayout($layout, array( 'imageAttrs' => $this->_buildAttrs(array( 'class' => 'jbimage', 'alt' => $alt, 'title' => $title, 'src' => $image->url, 'width' => $image->width, 'height' => $image->height, )), 'linkAttrs' => $this->_buildAttrs(array( 'class' => 'jbimage-link ' . $appendClass, 'title' => $title, 'href' => $url, 'rel' => $rel, 'target' => $target, 'id' => uniqid('jbimage-link-'), )), 'link' => $url, 'image' => $image ) ); }
и замените их на
if ($image && $layout = $this->getLayout('jbimage-' . $template . '.php')) { return $this->renderLayout($layout, array( 'imageAttrs' => $this->_buildAttrs(array( 'class' => 'jbimage', 'alt' => $alt, 'title' => $title, 'src' => $image->url, 'width' => $image->width, 'height' => $image->height, )), 'linkAttrs' => $this->_buildAttrs(array( 'class' => 'jbimage-link ' . $appendClass, 'title' => $title, 'href' => $url, 'rel' => $rel, 'target' => $target, 'id' => uniqid('jbimage-link-'), )), 'link' => $url, 'image' => $image, 'title' => $title ) ); }
После этого откройте файл шаблона, тот который вы выбрали в настройках элемента. Они находятся в папке
сайт\media\zoo\applications\jbuniversal\elements\jbimage\tmpl
Я открыл jbimage-popup.php т.к именно его я использую. И добавил вывод title
<?php /** * JBZoo App is universal Joomla CCK, application for YooTheme Zoo component * * @package jbzoo * @version 2.x Pro * @author JBZoo App http://jbzoo.com * @copyright Copyright (C) JBZoo.com, All rights reserved. * @license http://jbzoo.com/license-pro.php JBZoo Licence * @coder Denis Smetannikov <denis@jbzoo.com> */ // no direct access defined('_JEXEC') or die('Restricted access'); App::getInstance('zoo')->jbassets->jbimagePopup(); echo '<a ' . $linkAttrs . '><img ' . $imageAttrs . ' /></a> ' . "\n"; echo $title; // выводим title материала
Теперь этот title вы можете поместить в любой тег - например DIV
Go to the full post