Bonjour, je cherche à creer un lien "readmore" sur mes images d'intro en mode blog.
voici le code de mon fichier blog_item.php :
Merci.
voici le code de mon fichier blog_item.php :
Code:
<div class="content clearfix"> <?php if (isset($images->image_intro) and !empty($images->image_intro)) { $imgfloat = (empty($images->float_intro)) ? $params->get('float_intro') : $images->float_intro; $class = (htmlspecialchars($imgfloat) != 'none') ? ' class="size-auto align-'.htmlspecialchars($imgfloat).'"' : ' class="size-auto"'; $title = ($images->image_intro_caption) ? ' title="'.htmlspecialchars($images->image_intro_caption).'"' : ''; echo '<img'.$class.$title.' src="'.htmlspecialchars($images->image_intro).'" alt="'.htmlspecialchars($images->image_intro_alt).'"/>'; if ($params->get('access-view')) { $link = JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid)); } echo $this->item->introtext; ?> </div> <?php if ($params->get('show_readmore') && $this->item->readmore) : ?> <p class="links"> <?php if ($params->get('access-view')) { $link = JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid)); } 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)); $link = new JURI($link1); $link->setVar('return', base64_encode($returnURL)); } ?>
Commentaire