Keyword

Sub category display

More
14 years 1 month ago #79965 by Steve Adams
Replied by Steve Adams on topic Sub category display
Hi Roland,

Did you make any progress with sub-category item titles? This seems to be a common mod request, not sure why it was omitted from K2 sub-category parameters when it is default in vanilla joomla. Also, are you sure components/com_k2/views/view.html.php exists in K2.2?

Thanks

Roland Jungwirth said:I have the same problem ... Just moving code isn't enough though, in components/com_k2/views/view.html.php, in the foreach loop on line 96, you'll have to populate the subcategory array item.
I failed up to now.

Marty Peet said:Well, that was rather interesting. Turned off catalog mode and added leading of 1. The page now has, from the top down, a description of my top level category, next descriptions of ALL secondary level categories STILL with large white spaces between them, and then at the bottom of the page individual items (item view in category view) What I'd like is to have each of the items listed underneath it's particular category introduction and no white space... probably have to start moving sections of code?

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

  • Marty Peet
  • Marty Peet's Avatar Topic Author
  • Offline
  • Premium Member
More
14 years 1 month ago #79966 by Marty Peet
Replied by Marty Peet on topic Sub category display
Hey Elisa, this appears to be the CSS that is already in the k2.css file?

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

More
14 years 1 month ago #79967 by Elisa F.
Replied by Elisa F. on topic Sub category display
Hi! Yes, but not the "display:none;" Argument

Marty Peet said:Hey Elisa, this appears to be the CSS that is already in the k2.css file?

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

  • Marty Peet
  • Marty Peet's Avatar Topic Author
  • Offline
  • Premium Member
More
14 years 1 month ago #79968 by Marty Peet
Replied by Marty Peet on topic Sub category display
Hey Elisa, quickest reply I've ever had!!! ;-] My k2.css has both lines in it, I probably read your reply earlier and implemented it ;-[ thank's for your input.

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

More
14 years 1 month ago #79969 by MC
Replied by MC on topic Sub category display
Solved!

I had this problem a while back while bug fixing for a client and was scratching my head how to solve it. When viewing in Firebug the style height appended to the div was there but when viewing source it wasn't so thought it must be a javascript thing.

This is a core hack so not the best way, but here goes...

1. Go to /components/com_k2/js/k2.js
2. Around line 90 there is a load function, all you need to do is comment out the whole thing (code below)
3. Job done!

//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.

  • Marty Peet
  • Marty Peet's Avatar Topic Author
  • Offline
  • Premium Member
More
14 years 1 month ago #79970 by Marty Peet
Replied by Marty Peet on topic Sub category display
BRILLIANT!!! thanks MC

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

More
13 years 9 months ago #79971 by Taylor Warnick
Replied by Taylor Warnick on topic Sub category display
finally found this! thanks MC

MC said:Solved!
I had this problem a while back while bug fixing for a client and was scratching my head how to solve it. When viewing in Firebug the style height appended to the div was there but when viewing source it wasn't so thought it must be a javascript thing.

This is a core hack so not the best way, but here goes...

1. Go to /components/com_k2/js/k2.js
2. Around line 90 there is a load function, all you need to do is comment out the whole thing (code below)
3. Job done!

//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 9 months ago #79972 by Justin Herrin
Replied by Justin Herrin on topic Sub category display
Hi Marty - did you ever get your question #2 answered? I'm looking for a way to do this as well. I have been trying to build my own template to do it, and I'm almost there, but it still needs that final bit of code that I can't figure out.

What I have displays my page like this...

Page Title - Parent Category title
- Subcategory 1 title
-- Subcategory 1 Item 1
-- Subcategory 1 Item 2
-- Subcategory 2 Item 1
-- Subcategory 2 Item 2

- Subcategory 2 title
-- Subcategory 1 Item 1
-- Subcategory 1 Item 2
-- Subcategory 2 Item 1
-- Subcategory 2 Item 2


As you can see, ALL items are showing under each subcategory, instead of just that specific subcategory's items. A bit frustrating so say the least.

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

  • Marty Peet
  • Marty Peet's Avatar Topic Author
  • Offline
  • Premium Member
More
13 years 9 months ago #79973 by Marty Peet
Replied by Marty Peet on topic Sub category display
I came up with this solution using the Tabs n Slides plugin

new.template.s50284.gridserver.com/index.php?option=com_k2&view=itemlist&layout=category&task=category&id=5&Itemid=4

Click on the Browse Experts tab, click on the slide titles. The titles are individual categories within the parent category Experts, each item in those sub-category is listed.

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


Powered by Kunena Forum