PDA

View Full Version : bar categories page



David Da silva
March 14, 2018, 01:21 PM
I would like to know why I present this discrepancy when browsing? I would like to see the bar on all the pages, how do I configure it?

Rudi
March 14, 2018, 08:13 PM
Hello David,

In fact, the scroll bar is added when there are more than 25 items, otherwise they are hidden,

if you always need a scroll bar with items number of more than 10
you should to ftp > templates > your template > js > lib.js > find this.categoryTree

then find and replace:


if ( count > desktop_limit_top && count <= desktop_limit_bottom ) {
var gt = desktop_limit_top - 1;
$(this).find('ul.cat-tree > li:gt('+gt+')').addClass('rest');

$(this).find('div.cat-toggle').removeClass('hide').click(function(){
$(this).prev().find('> li.rest').toggle();
});
$(this).removeClass('limit-height');
}
else if (count > desktop_limit_bottom) {
$(this).mCustomScrollbar();
}
else {
$(this).removeClass('limit-height');
}


with:


if (count > desktop_limit_top) {
$(this).mCustomScrollbar();
}



then go to directory css > style.css

find and change:


section.categories-box div.cat-tree-cont.limit-height {
max-height: 360px;
}


to:


section.categories-box div.cat-tree-cont.limit-height {
max-height: 295px;
}

David Da silva
March 15, 2018, 06:48 PM
Rudi, Excellent. many thaks!!!