Keyword

Category and subcategories

  • Johann Scheving
  • Johann Scheving's Avatar Topic Author
  • Offline
  • New Member
More
15 years 3 weeks ago #72009 by Johann Scheving
Category and subcategories was created by Johann Scheving
I created a category and then couple of subcategories.
see www.watersportsfl.com/watersports/fishing.html
The second subcategory always moves down creating large empty space?

Please Log in or Create an account to join the conversation.

More
15 years 3 weeks ago #72010 by Lefteris
Replied by Lefteris on topic Category and subcategories
Hi. There is a script that tries to give all subcategory blocks the same height so they look nice when you have a "catalog" like layout. For your case if you don't want this you can open file components/com_k2/js/k2.js and remove or comment out lines 85 to 97 ( assuming you have the latest version of K2 ). This will solve your problem. Maybe we need to add an option for this so the user will be able to disable it easily.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Johann Scheving
  • Johann Scheving's Avatar Topic Author
  • Offline
  • New Member
More
15 years 3 weeks ago #72011 by Johann Scheving
Replied by Johann Scheving on topic Category and subcategories
Thanks for good response. This works. This should definitely be in the settings or in documentation. Is there any documentation available?

Lefteris Kavadas said:Hi. There is a script that tries to give all subcategory blocks the same height so they look nice when you have a "catalog" like layout. For your case if you don't want this you can open file components/com_k2/js/k2.js and remove or comment out lines 85 to 97 ( assuming you have the latest version of K2 ). This will solve your problem. Maybe we need to add an option for this so the user will be able to disable it easily.

Please Log in or Create an account to join the conversation.

More
15 years 1 week ago #72012 by Markus Thiel
Replied by Markus Thiel on topic Category and subcategories
You really should put this in the css instead :)

Please Log in or Create an account to join the conversation.

  • Miltiadis bouchalakis
  • Miltiadis bouchalakis's Avatar
  • Offline
  • Junior Member
More
14 years 2 months ago #72013 by Miltiadis bouchalakis
Replied by Miltiadis bouchalakis on topic Category and subcategories
in 2.3 the code exists in lines 91-103
bellow is the code:

window.addEvent('load', function(){

// Equal block heights for the "default" view
if($$('.subCategory')){
var blocks = $$('.subCategory');
var maxHeight = 0;
blocks.each(function(item){
maxHeight = Math.max(maxHeight, parseInt(item.getStyle('height')));
});
blocks.setStyle('height', maxHeight);
}

});

Please Log in or Create an account to join the conversation.

More
13 years 7 months ago #72014 by that library
Replied by that library on topic Category and subcategories
This also happened when I upgraded to 2.4.1 :(
I have commented out the lines indicated and still, gigantic empty spaces between the subcategories. I have also implemented the changes suggested here: community.getk2.org/forum/topics/how-to-eliminate-the-large
to no avail!

Please Log in or Create an account to join the conversation.

More
13 years 7 months ago #72015 by that library
Replied by that library on topic Category and subcategories
I have found the solution!!! :D

in components/com_k2/css/k2.css
In the SubCategory Block section, (Lines 336-350)

Change line 336 from this:

div.subCategoryContainer {float:left;height:auto!important;}

TO:
div.subCategoryContainer {float:left;height:100%!important;}

Change line 341 from this:

div.subCategory {background:#f7fafe;border:1px solid #ddd;margin:4px;padding:8px;height:auto!important;}

TO:

div.subCategory {background:#f7fafe;border:1px solid #ddd;margin:4px;padding:8px;height:100%!important;}

Violá! :D

Please Log in or Create an account to join the conversation.

More
13 years 6 months ago #72016 by Daria Denisova
Replied by Daria Denisova on topic Category and subcategories
guys, I've deleted what is needed from the .js file and used the second method described by Carolyn too... this didn't work  :( can somebody advice? thanx

Please Log in or Create an account to join the conversation.

More
13 years 6 months ago #72017 by W8ing4
Replied by W8ing4 on topic Category and subcategories
I have a similar problem.

When I enable the sub-category blocks, my left and right modules are pushed down to the second half of the page, they appear soon after the end of k2 main content. If I disable them, everything works fine.

 

I'm using Joomla 5.22 and ja purity template.

 

Thanks!

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum