-
AuthorPosts
-
vernontee Friend
vernontee
- Join date:
- November 2015
- Posts:
- 440
- Downloads:
- 53
- Uploads:
- 22
- Thanks:
- 18
- Thanked:
- 4 times in 4 posts
December 15, 2015 at 6:29 pm #815582In each parent i may have up to 30 children, but would like to limit to top X child categories (1), the order of which determined as in the order in the K2. (2)
Is this possible?
http://screenpresso.com/=TbEYd
http://screenpresso.com/=CB1hfAdam M ModeratorAdam M
- Join date:
- May 2014
- Posts:
- 5159
- Downloads:
- 33
- Uploads:
- 66
- Thanks:
- 95
- Thanked:
- 1271 times in 1235 posts
December 16, 2015 at 10:57 am #816608Hi @vernontee,
Currently this part is implemented via module Browse Listings By Categories (K2 Tools). By default, it only let you specify how many level of subcategories will be rendered (parameter Levels to render), there’s no option that let you choose how many item will be displayed.
vernontee Friendvernontee
- Join date:
- November 2015
- Posts:
- 440
- Downloads:
- 53
- Uploads:
- 22
- Thanks:
- 18
- Thanked:
- 4 times in 4 posts
December 16, 2015 at 3:21 pm #817040Hi i see the post was updated but i dont see a reply 🙁
vernontee Friendvernontee
- Join date:
- November 2015
- Posts:
- 440
- Downloads:
- 53
- Uploads:
- 22
- Thanks:
- 18
- Thanked:
- 4 times in 4 posts
December 17, 2015 at 3:54 am #817998Is it possible to modify something to limit it?
Adam M ModeratorAdam M
- Join date:
- May 2014
- Posts:
- 5159
- Downloads:
- 33
- Uploads:
- 66
- Thanks:
- 95
- Thanked:
- 1271 times in 1235 posts
December 17, 2015 at 4:55 am #818094Hi @vernontee,
Currently this part is implemented via module Browse Listings By Categories (K2 Tools). By default, it only let you specify how many level of subcategories will be rendered (parameter Levels to render), there’s no option that let you choose how many item will be displayed.
vernontee Friendvernontee
- Join date:
- November 2015
- Posts:
- 440
- Downloads:
- 53
- Uploads:
- 22
- Thanks:
- 18
- Thanked:
- 4 times in 4 posts
December 18, 2015 at 4:08 pm #820644Hi Adam,
Im sorry to ask again… i understand it has the option only to set how many level down… but is there anyway i "could" modify it in hardcoding how many items to even display
Adam M ModeratorAdam M
- Join date:
- May 2014
- Posts:
- 5159
- Downloads:
- 33
- Uploads:
- 66
- Thanks:
- 95
- Thanked:
- 1271 times in 1235 posts
December 19, 2015 at 3:42 am #821311Hi @vernontee,
You can open file templatesja_directoryhtmlmod_k2_toolscustomcategories.php and look for this block :
if (modK2ToolsHelper::hasChildren($row->id)) { $output .= '<li class="'.$liClass.'" ><a style="color: '.$color.'; border-color: '.$color.'" href="'.urldecode($link).'"><img src="'.$icon.'" alt="'.$row->name.'" /><span class="catTitle">'.$row->name.'</span><span class="catCounter">'.$row->numOfItems.'</span></a>'; ja_k2_treerecurse($params, $row->id, $level + 1); $output .= '</li>'; $i++; } else { $output .= '<li class="'.$liClass.'" ><a href="'.urldecode($link).'"><i class="fa fa-check-circle" style="color: '.$color.';"></i><span class="catTitle">'.$row->name.'</span><span class="catCounter" style="color: '.$color.';">'.$row->numOfItems.'</span></a></li>'; }
the part you need to modify is :
else { $output .= '<li class="'.$liClass.'" ><a href="'.urldecode($link).'"><i class="fa fa-check-circle" style="color: '.$color.';"></i><span class="catTitle">'.$row->name.'</span><span class="catCounter" style="color: '.$color.';">'.$row->numOfItems.'</span></a></li>'; }
-
AuthorPosts
This topic contains 6 replies, has 2 voices, and was last updated by Adam M 8 years, 11 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum