My VM frontpage displays categories.
But displays only the image, not the description.
How can I make it display the description?
Hi,
you may need to use html override. If you already have it please open /templates/YOUR_TEMPLATE/html/com_virtuemart/sublayouts/categories.php
and paste this code below somewhere between lines 67 and 79:
<?php echo shopFunctionsF::limitStringByWord ($category->category_description, 150, ' ...') ?>
in these lines:
<div class="category floatleft<?php echo $category_cellwidth . $show_vertical_separator ?>">
<div class="spacer">
<h2>
<a href="<?php echo $caturl ?>" title="<?php echo vmText::_($category->category_name) ?>">
<?php echo vmText::_($category->category_name) ?>
<br />
<?php // if ($category->ids) {
echo $category->images[0]->displayMediaThumb("",false);
//} ?>
</a>
</h2>
</div>
</div>
If your template does not provide override you can make it by copy
/components/com_virtuemart/sublayouts/categories.php
and paste it to
/templates/YOUR_TEMPLATE/html/com_virtuemart/sublayouts/
I put it directly in the code, without override, works fine.
I just hoped that it could be done without changing the code (not even with an override).
I guess it can't be done in some other way.
Thank you for your help!
panoss, you cannot update virtuemart, or you loose your changes, it's why overide is better.
I didn't think of this, thanks, I'll make an override.