的Joomla!需要使用相机幻灯片显示可链接的横幅图像

时间:2015-08-19 12:16:56

标签: php joomla slider

需要使用相机幻灯片制作可链接的图像。必须在材料中从Url_A收到网址。

_item.php

中的

<div class="camera-item" data-src="<?php echo htmlspecialchars($images->image_intro); ?>">

我试着做

<?php $urls = json_decode($item->urls); ?>
<a href="<?php echo $urls->urla;?>">
<div class="camera-item" data-src="<?php echo htmlspecialchars($images->image_intro); ?>">
</div></a>

但得到了错误。请帮助新手!抱歉英语不好:)

21.08 _item.php 的完整代码,但有一些更改

    <?php

defined('_JEXEC') or die;
$images = json_decode($item->images);
$urls = json_decode($item->urls);
$slider_img = htmlspecialchars($images->image_intro);
?>


<div class="camera-item" rel="<?php echo $urls->urla;?>" data-src="<? echo $slider_img; ?>">

    <?php if ($params->get('show_caption')): ?>
        <div class="camera_caption <?php echo $params->get('captionEffect'); ?>">
            <?php $item_heading = $params->get('item_heading', 'h4'); ?>
            <?php if ($params->get('item_title')) : ?>

                <<?php echo $item_heading; ?> class="slide-title<?php echo $params->get('moduleclass_sfx'); ?>">
                <?php if ($params->get('link_titles') && $item->link != '') : ?>
                    <a href="<?php echo $item->link;?>">
                        <?php echo $item->title;?></a>
                <?php else : ?>
                    <?php echo $item->title; ?>
                <?php endif; ?>
                </<?php echo $item_heading; ?>>

            <?php endif; ?>

            <?php if (!$params->get('intro_only')) :
                echo $item->afterDisplayTitle;
            endif; ?>

            <?php echo $item->beforeDisplayContent; ?>


            <?php echo $item->introtext; ?>

            <?php if (isset($item->link) && $item->readmore != 0 && $params->get('readmore')) :
                echo '<a class="readmore" href="'.$item->link.'">'.$item->linkText.'</a>';
            endif; ?>
        </div>
    <?php endif; ?>

</div>

我得到了url属性rel但仍然无法制作可点击的图片:( 在萤火虫中

<div id="camera-slideshow" class="camera_wrap" style="height: 755px;">
<div class="camera_fakehover">
<div class="camera_src camerastarted camerasliding">
<div class="camera-item" data-src="images/slide1.jpg" rel="/index.php/urla"> </div>
<div class="camera-item" data-src="images/slide2.jpg" rel="/index.php/urla"> </div>
<div class="camera-item" data-src="images/slide3.jpg" rel=""> </div>
</div>

源代码                           

<div class="camera-item" rel="/index.php/urla" data-src="images/slide1.jpg">

            <div class="camera_caption fadeIn">

            <div class="txt1">some text</div>
<div class="txt2">some text</div>   
                    </div>

</div>

0 个答案:

没有答案