Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • vernontee Friend
    #815582

    In 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/=CB1hf

    Adam M Moderator
    #816608

    Hi @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 Friend
    #817040

    Hi i see the post was updated but i dont see a reply 🙁

    vernontee Friend
    #817998

    Is it possible to modify something to limit it?

    Adam M Moderator
    #818094

    Hi @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 Friend
    #820644

    Hi 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 Moderator
    #821311

    Hi @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>';
    }
Viewing 7 posts - 1 through 7 (of 7 total)

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