Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • joomini Friend
    #721628

    Hi,

    How do I add another column to the K2 Tools module “Browse Listings By Categories”
    On the JA Directory demo there are only 4 column.

    I would like to have 5 or 6 columns.

    Thanks.

    Ninja Lead Moderator
    #723330

    Hi,

    This is example to change 4 columns to 5 into the K2 Tools module “Browse Listings By Categories”

    + Open templates/ja_directory/html/mod_k2_tools/customcategories.php file and change as my highlight text below

    + Create templates/ja_directory/css/custom.css file and add new rule

    .t3-section .k2CategoriesListBlock .level0 > li {
    width: 20% !important;
    }

    .t3-section .k2CategoriesListBlock .level0 > li:nth-child(5n + 1) {
    clear: both !important;
    }

    .t3-section .k2CategoriesListBlock .level0 > li:nth-child(4n + 1) {
    clear: none;
    }

    Regards

    Ninja Lead Moderator
    #754038

    Hi,

    This is example to change 4 columns to 5 into the K2 Tools module “Browse Listings By Categories”

    + Open templates/ja_directory/html/mod_k2_tools/customcategories.php file and change as my highlight text below

    + Create templates/ja_directory/css/custom.css file and add new rule

    .t3-section .k2CategoriesListBlock .level0 > li {
    width: 20% !important;
    }

    .t3-section .k2CategoriesListBlock .level0 > li:nth-child(5n + 1) {
    clear: both !important;
    }

    .t3-section .k2CategoriesListBlock .level0 > li:nth-child(4n + 1) {
    clear: none;
    }

    Regards

    joomini Friend
    #723600

    Thanks a lot.
    It’s working!

    joomini Friend
    #754130

    Thanks a lot.
    It’s working!

    teutobahiano Friend
    #815420

    Hi,

    I need 8 colums IN TWO ROWS. I tried using a copy of the ‘Browse Listings by Categories’ module but I got a blank page. Any other solution?

    Ninja Lead Moderator
    #816113

    Hi,

    I need 8 colums IN TWO ROWS. I tried using a copy of the ‘Browse Listings by Categories’ module but I got a blank page. Any other solution?

    @teutobahiano: You need to set 8 columns in two rows, it means: it is 4 columns per row, right? I see by default it is displaying in that way, look at our demo here

    winbelltrade Friend
    #851225

    I followed this solution. I created 6 columns and the categories listing changed to 6 columns listings from 4 columns were displayed and the 2 new columns remained blank. How do I make the newly created 2 columns to list category items. Check http://www.nigerialist.com See image.


    1. Column-Positioning-1
    Ninja Lead Moderator
    #851467

    @winbelltrade: Below is solution to change from 4 -> 6 columns of the Browse Listings by Categories module

    • Open templates/ja_directory/html/mod_k2_tools/customcategories.php file

    find and change

    if (($option == 'com_k2') && ($view == 'itemlist') && ($catid == $row->id))
    {
        $liClass = 'activeCategory';
        if ($i >= 4) {
            $liClass .= 'collapse';
        }
    }
    else
    {
        $liClass = '';
    
        if ($i >= 4) {
            $liClass .= 'collapse';
        }
    }

    to

    if (($option == 'com_k2') && ($view == 'itemlist') && ($catid == $row->id))
    {
        $liClass = 'activeCategory';
        if ($i >= 6) {
            $liClass .= 'collapse';
        }
    }
    else
    {
        $liClass = '';
    
        if ($i >= 6) {
            $liClass .= 'collapse';
        }
    }
    • Open templates/ja_directory/css/custom.css file and add rule CSS style
    .t3-section .k2CategoriesListBlock .level0 > li {
        width: 15% !important;
    }    
    
    .t3-section .k2CategoriesListBlock .level0 > li:nth-child(6n + 1) {
      clear: both !important;
    }
    
    .t3-section .k2CategoriesListBlock .level0 > li:nth-child(4n + 1) {
        clear: none;
    }

    Hope it helps

    winbelltrade Friend
    #851614

    It did help but not completely. The first row now displays 6 columns correctly but the second and subsequent rows are display only 3 columns instead of 6 columns (see image). The directory is to have 6 columns and 5 rows. What should I add to the code to let it render 6 columns in every row. Thanks


    1. Columns-and-rows
    Ninja Lead Moderator
    #851624

    Try to add the CSS style below into templates/ja_directory/css/custom.css file

    .t3-section .k2CategoriesListBlock .level0 > li:nth-child(5n) {
        clear: none;
    }

    Hope it helps

    winbelltrade Friend
    #853467

    Thank you Ninja Lead, the code did the job perfectly. However a little issue came up after the implementation and I have not been able to fix it. I would like to increase the spacing between a new CATEGORY and the sub-categore before it. Currently the spacing have gone. Kindly see the attached image with the red arrow pointing to where I will like a larger spacing.

    Thanks


    1. Category-and-sub-category-space
    Ninja Lead Moderator
    #854343

    Hi,

    You can fix the spacing issue on your site with my tweak given below

    Open templates/ja_directory/css/custom.css file and add new CSS style

    .t3-section .k2CategoriesListBlock .level0 > li.collapse.in {
        padding-top: 10px;
    }

    Hope it helps

    winbelltrade Friend
    #858174

    Your solution solved the problem. Thanks

Viewing 14 posts - 1 through 14 (of 14 total)

This topic contains 13 replies, has 4 voices, and was last updated by  winbelltrade 8 years, 3 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum