News:

Looking for documentation? Take a look on our wiki

Main Menu

Category view - entire div as link?

Started by Watto, March 09, 2014, 10:26:59 AM

Previous topic - Next topic

Watto

Hi guys,

Here's the site I'm working on.  I'd like the entire div which contains the image, link and title to be a link, rather than the individual elements.  I'm thinking it's this part:

$caturl = JRoute::_ ( 'index.php?option=com_virtuemart&view=category&virtuemart_category_id=' . $category->virtuemart_category_id );

// Show Category ?>
<div class="category floatleft<?php echo $category_cellwidth $show_vertical_separator ?>">
<div class="spacer">
<?php echo $category->images[0]->displayMediaThumb("",false); ?>

<h2 class="catSub"> <a href="<?php echo $caturl ?>" title="<?php echo $category->category_name ?>"> <?php echo $category->category_name ?> </a> </h2>
</div>
</div>
<?php
$iCategory ++;


...but I can't figure out how to change it.

Cheers!

K&K media production

this should be work


<a href="<?php echo $caturl ?>" title="<?php echo $category->category_name ?>">
<div class="category floatleft<?php echo $category_cellwidth $show_vertical_separator ?>">
<div class="spacer">
<img src="<?php echo $category->images[0]->file_url_thumb?>"  alt="<?php echo $category->images[0]->file_meta?>" class="browseProductImage">
<h2 class="catSub">  <?php echo $category->category_name ?>  </h2>
</div>
</div>
</a>