Mini k2 Support for multi categories?
- Posted by lynn (3) Offline
I have Additional categories installed along with mini k2, and I would like to be able to pull items that have multi categories. Currently it just pulls the item if the category is set in the core k2, but not the ones I assign in the additional categories.
How can we make these work together?
11 years 1 week ago #1
by lynn
How can we make these work together?
Please Log in or Create an account to join the conversation.
- Posted by TemplatePlazza (5263) Offline
Hi Ibrown, can you tell me what do you mean by additional categories?
Btw you can change the category setting from the module backend. Please have alook on this : d.pr/i/dYNH
11 years 1 week ago #2
by TemplatePlazza
Btw you can change the category setting from the module backend. Please have alook on this : d.pr/i/dYNH
Please Log in or Create an account to join the conversation.
- Posted by lynn (3) Offline
Hi,
I have an addon for k2 - extensions.joomla.org/extensions/extensi.../k2-extensions/22204
It allows me to put k2 items in more than one category. For example, I have a client that would fall under web design and print design categories. So the Additional Categories Addon allows me to do this, but the Mini K2 doesn't recognize the additional categories I've set. So in the module on the Print Page, it's set to show k2 items fro the print category, but it doesn't show it if that's it's second category. It will show in the web design module, since that's it's primary category.
Does that make sense?
11 years 1 week ago #3
by lynn
I have an addon for k2 - extensions.joomla.org/extensions/extensi.../k2-extensions/22204
It allows me to put k2 items in more than one category. For example, I have a client that would fall under web design and print design categories. So the Additional Categories Addon allows me to do this, but the Mini K2 doesn't recognize the additional categories I've set. So in the module on the Print Page, it's set to show k2 items fro the print category, but it doesn't show it if that's it's second category. It will show in the web design module, since that's it's primary category.
Does that make sense?
Please Log in or Create an account to join the conversation.
- Posted by TemplatePlazza (5263) Offline
Hi ibrwn, Unfortunately Minik2 doesn't support it. Sorry about that
11 years 1 week ago #4
by TemplatePlazza
Please Log in or Create an account to join the conversation.
- Posted by Matze (4) Offline
Hi,
I know this thread is older, but if anyone is interested I got a workaround / solution for this problem I got. too.
It's a mix of minik2 and additional categories. Just edit modules/mod_minik2/tmpl/portfolio/default.php as follows or copy the whole code. It's my default.php:Hope, this helps anyone...
Matthew.
8 years 9 months ago #5
by Matze
I know this thread is older, but if anyone is interested I got a workaround / solution for this problem I got. too.
It's a mix of minik2 and additional categories. Just edit modules/mod_minik2/tmpl/portfolio/default.php as follows or copy the whole code. It's my default.php:
<?php
/**
* @version $Id: default.php 565 2010-09-23 11:48:48Z schro $
* @package Mini K2
* @subpackage Portfolio with quicksand sorting sub template
* @author TemplatePlazza http://www.templateplazza.com
* @copyright Copyright (c) 2007 - 2012 TemplatePlazza, web developement and design marketplace. All rights reserved.
* @copyright Copyright (c) 2011 tutorialzine.com
* @copyright Copyright (c) 2006 - 2012 JoomlaWorks, a business unit of Nuevvo Webware Ltd. All rights reserved.
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
*/
// no direct access
defined('_JEXEC') or die('Restricted access');
?>
<div id="filter"></div>
<div id="folio-container">
<ul id="stage">
<?php
foreach ($items as $key=>$item){
$itemID = $item->id;
?>
<?php $db = JFactory::getDBO();
$query = "SELECT c.`id`,c.`name`,c.`alias` FROM #__k2_additional_categories AS ca, #__k2_categories AS c WHERE ca.`itemID` ='$itemID' AND c.`id`=ca.`catid`";
$db->setQuery( $query );
$sel_value = $db->loadObjectList();
echo '<li data-type="'.$item->categoryname;
foreach($sel_value as $v) {
echo ', '.$v->name;
}
echo '" />';
?>
<a href="<?php echo $item->link; ?>">
<?php if (!$item->image): ?>
<img src="images/header/no-image-th.jpg" alt="<?php echo $item->title; ?>" />
<?php else: ?>
<img src="<?php echo resizeImageHelper::getResizedImage('/'.$item->image, $tmbWidth, $tmbHeight, $option); ?>" alt="<?php echo $item->title; ?>" style="height:<?php echo $tmbHeight; ?>px; width:<?php echo $tmbWidth; ?>px" />
<?php endif; ?>
<div class="description">
<h3><?php echo $item->title; ?></h3>
<p><?php if($params->get('itemIntroText')) { echo $item->introtext; } ?></p>
</div>
</a>
</li>
<?php } ?>
</ul>
</div>
<!-- MiniK2 Joomla 3.0 module - Another Quality Freebie from TemplatePlazza.com -->
Matthew.
Please Log in or Create an account to join the conversation.
- Posted by Tom (1) Offline
Sorry I know this is an old topic, I have tried Bambbamsn2009 solution however I get the following message "Please check your setting to get the items or maybe you need to write your K2 items first."
Have there been changes that have affected this code? hoping someone can help.
Apologies I cannot add a url or link as I am testing on local.
6 years 10 months ago #6
by Tom
Have there been changes that have affected this code? hoping someone can help.
Apologies I cannot add a url or link as I am testing on local.
Please Log in or Create an account to join the conversation.