Hi all,
Being new to K2, I'm trying to implement some sort of automatic way, of not having the "Read more" displayed on Categories without items. As we have many categories, I would really like to avoid the manual way of doing this, by setting this on each category.
So - in the K2 template, I have modified the showing of the "subCategoryMore" class, and added the if-statement trying to determine if there is any items below the category.
<?php if(($subCategory->numOfItems) != 0): ?> <a class="subCategoryMore" href="<?php echo $subCategory->link; ?>"> <?php echo JText::_('View items...'); ?> </a><?php endif; ?>
However - this only works, if I have set the "Item counter (next to sub-category title)" to show in the category view options.
Does anybody have a suggestion on how to make this independant of showing the "Item counter" next to the category title?
edit: link removed...
Cheers,Henrik ;)
Being new to K2, I'm trying to implement some sort of automatic way, of not having the "Read more" displayed on Categories without items. As we have many categories, I would really like to avoid the manual way of doing this, by setting this on each category.
So - in the K2 template, I have modified the showing of the "subCategoryMore" class, and added the if-statement trying to determine if there is any items below the category.
<?php if(($subCategory->numOfItems) != 0): ?> <a class="subCategoryMore" href="<?php echo $subCategory->link; ?>"> <?php echo JText::_('View items...'); ?> </a><?php endif; ?>
However - this only works, if I have set the "Item counter (next to sub-category title)" to show in the category view options.
Does anybody have a suggestion on how to make this independant of showing the "Item counter" next to the category title?
edit: link removed...
Cheers,Henrik ;)