Joomla K2 - Get K2 image URL

849 Views Asked by At

So i've did this into my template php file to show different header between Item and Itemlist views.

<!-- BLOG HEADER RENDER -->
<?php $com=JRequest::getCmd( 'option'); $view=JRequest::getCmd( 'view'); $img=JRequest::getCmd( 'CatItemImage'); if($com=='com_k2' && $view!='item' ): ?>
<div class="headerblog">
     <h2>Lorem Ipsum <span>dolore algo mais...</span> </h2>

</div>
<?php else: ?>
<img src="<?php echo $img ;?>" width="100%" height="380px" />
<?php endif ?>

The condition works well, but I am having problems to get CatItemImage from Item view.

  • Joomla Version: 3.2
  • K2 Version: 2.6.7

Anybody could help? Thanks in advance!

0

There are 0 best solutions below