Alekxander
Мой дом здесь!
- Регистрация
- 3 Янв 2018
- Сообщения
- 515
- Реакции
- 266
- Автор темы
- #1
Джумла 4. Шаблон на shaper_helixultimate.
Слайдер выводится модулем html с помощью плагина shortcodes.
Модуль html выводит логотипы производителей.
Нужна помощь. В модуле прописываю для изображения title и alt, но не выводятся. А выводится из плагина.
( title="" alt="title_68664db6057ea5706757101751535030" )
Каким образом можно прописать атрибуты для изображения?
Слайдер выводится модулем html с помощью плагина shortcodes.
PHP:
<?php
/*
* @package YouTech Shortcodes
* @author YouTech Company http://smartaddons.com/
* @copyright Copyright (C) 2015 YouTech Company
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/
defined('_JEXEC') or die;
function content_slider_itemYTShortcode($atts,$content = null)
{
extract(ytshortcode_atts(array(
'class' => '',
'src' =>'',
'caption' => 'no',
'link' => ''
),$atts));
$image = ($src !='') ? '<img src='.JURI::base().$src.' alt='.uniqid("title_").rand().time().'>' : 'plugins/system/ytshortcodes/assets/images/URL_IMAGES.png';
if($link != '')
{
$image = '<a href="'.$link.'" title="" target="brank">'.$image.'</a>';
}
if($caption == "yes")
{
return '<div class="yt-content-slide yt-content-wrap' . $class . '"> '.$image.' <div class="caption">'.parse_shortcode(str_replace(array("<br/>", "<br>", "<br />"), " ", $content)).'</div></div>';
}
else{
return '<div class="yt-content-slide yt-clearfix yt-content-wrap' . $class . '"> '.$image.'</div>';
}
}
?>
HTML:
<p>[yt_content_slider style="default" margin="0" items_column0="7" items_column1="5" items_column2="4" items_column3="2" items_column4="1" type_change="fade" transitionin="fadeIn" transitionout="fadeOut" arrows="no" arrow_position="arrow-default" pagination="no" autoplay="yes" autoheight="no" hoverpause="yes" lazyload="no" loop="yes" speed="0.6" delay="4" ]
[yt_content_slider_item src="images/brands/1(1).webp" alt="Timberlend" title="Timberlend" caption="yes" link="index.php?option=com_jshopping&view=manufacturer&layout=man&task=view&manufacturer_id=53" ] Add Content Here [/yt_content_slider_item]
( title="" alt="title_68664db6057ea5706757101751535030" )
Каким образом можно прописать атрибуты для изображения?