【发布时间】:2013-11-02 21:19:27
【问题描述】:
我发现这个 com_content/views/article/tmpl/default.php 我创建了一个模板覆盖,这里是代码:
<?php if ($params->get('access-view')):?>
<?php if (isset($images->image_fulltext) && !empty($images->image_fulltext)) : ?>
<?php $imgfloat = (empty($images->float_fulltext)) ? $params->get('float_fulltext') : $images->float_fulltext; ?>
<div class="pull-<?php echo htmlspecialchars($imgfloat); ?> item-image">
<img
<?php if ($images->image_fulltext_caption):
echo 'class="caption"'.' title="' .htmlspecialchars($images->image_fulltext_caption) . '"';
endif; ?>
src="<?php echo htmlspecialchars($images->image_fulltext); ?>" alt="<?php echo htmlspecialchars($images->image_fulltext_alt); ?>"/> </div>
<?php endif; ?>
在img标签如何形成之前,修改这个php代码,使其可以点击图片到自己的url:
<a href="<?php echo JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid)); ?>"> <img
【问题讨论】:
-
你的代码目前发生了什么?
-
现在图片是可点击的,但是到文章的网址,但我想自己的图片网址...
标签: php image joomla joomla3.1