Link K2 subcategories

Support desk for Multipurpose Quark Theme
GK User
Sat Jun 13, 2015 5:07 am
What code to display the link of k2 sub-categories in the category page?
This is standard k2 and how the quark theme is custom, did not come.
He needed only a guideline for me to implement it.
grateful
User avatar
Senior Boarder

GK User
Sat Jun 13, 2015 8:31 pm
Solved.
Only add this lines:

<?php if($this->params->get('subCategories') && isset($this->subCategories) && count($this->subCategories)): ?>
<div class="itemListSubCategories">
<h2><?php echo JText::_('K2_CHILDREN_CATEGORIES'); ?></h2>
<?php foreach($this->subCategories as $key=>$subCategory): ?>
<?php
if( (($key+1)%($this->params->get('subCatColumns'))==0) || count($this->subCategories)<$this->params->get('subCatColumns') )
$lastContainer= ' subCategoryContainerLast';
else
$lastContainer='';
?>
<div class="subCategoryContainer<?php echo $lastContainer; ?>"<?php echo (count($this->subCategories)==1) ? '' : ' style="width:'.(number_format(100/$this->params->get('subCatColumns'), 1)-0.1).'%;"'; ?>>
<div class="subCategory">
<?php if($this->params->get('subCatImage') && $subCategory->image): ?>
<a class="subCategoryImage" href="<?php echo $subCategory->link; ?>"> <img alt="<?php echo K2HelperUtilities::cleanHtml($subCategory->name); ?>" src="<?php echo $subCategory->image; ?>" /> </a>
<?php endif; ?>
<?php if($this->params->get('subCatTitle')): ?>
<h3> <a href="<?php echo $subCategory->link; ?>"> <?php echo $subCategory->name; ?> <span>
<?php if($this->params->get('subCatTitleItemCounter')) echo ' ('.$subCategory->numOfItems.')'; ?>
</span> </a> </h3>
<?php endif; ?>
<?php if($this->params->get('subCatDescription')): ?>
<?php echo $subCategory->description; ?>
<?php endif; ?>
<a class="readon" href="<?php echo $subCategory->link; ?>"> <?php echo JText::_('K2_VIEW_ITEMS'); ?> </a> </div>
</div>
<?php if(($key+1)%($this->params->get('subCatColumns'))==0): ?>
<div class="clr"></div>
<?php endif; ?>
<?php endforeach; ?>
</div>
<?php endif; ?>
User avatar
Senior Boarder

teitbite
Sun Jun 14, 2015 9:08 am
Hi

Ok. Thank You for shearing this. Yes we have removed it according to designer intentions. If You need some styling for this new part just tell me the url to page with this and I'll try figure something out.
User avatar
Moderator


cron