Keyword

Newbie Questions

  • mental
  • mental's Avatar Topic Author
  • Offline
  • New Member
More
15 years 8 months ago #70660 by mental
Newbie Questions was created by mental
I started dabbling with K2 a couple of hours ago and I seem to have problems with attaining my goal. I am trying to make a product list/portfolio. First of all i would like visitors to see the categories and then when they click the a category see all the items in there. Now I just get the items and what category they have been pisblished in (which is something i also would like to get rid of ... the pusblished in category name sentence).

Maybe it's me, maybe it is because it gets late but I can't seem to figure it out.

Any help/pointers/... or free candy would be greatly appreciated.


Thanks

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

More
15 years 8 months ago #70661 by Erebrum
Replied by Erebrum on topic Newbie Questions
if you mean something like this k2.joomlaworks.gr/demo/ - show categories like blocks then articles. It is done like this:
1. create 1 "MAIN" category
2. put categories you wanna show in to that category
- MAIN
|_ CAT1
|_ CAT2
|_ CAT3
|_ ....

Then make a menu link which will point to MAIN category, K2 will render blocks of sub-categories at the top followed by articles. Not sure atm. how to get rid of "published in category" part.

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

More
15 years 8 months ago #70662 by hengstler
Replied by hengstler on topic Newbie Questions
Hi Erebrum

Yes, it's that what I'd like to do. Some main categories (blocks) with some articles in it and/or sub-categories ...



Erebrum said:if you mean something like this k2.joomlaworks.gr/demo/ - show categories like blocks then articles. It is done like this: 1. create 1 "MAIN" category
2. put categories you wanna show in to that category
- MAIN
|_ CAT1
|_ CAT2
|_ CAT3
|_ ....

Then make a menu link which will point to MAIN category, K2 will render blocks of sub-categories at the top followed by articles. Not sure atm. how to get rid of "published in category" part.

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

More
15 years 8 months ago #70663 by Enrico Ardito
Replied by Enrico Ardito on topic Newbie Questions
The point is how to link to CATEGORIES and not to items?. In K2's menu items I can only see:
item
item: Create a menu item linking directly to an item in K2.

item listings
category: Displays a list of items from one or more categories.

Nothing that displays and/or link directly to categories. :-S

Erebrum said:1. create 1 "MAIN" category
2. put categories you wanna show in to that category
- MAIN
|_ CAT1
|_ CAT2
|_ CAT3
|_ ....

Then make a menu link which will point to MAIN category, K2 will render blocks of sub-categories at the top followed by articles. Not sure atm. how to get rid of "published in category" part.

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

More
15 years 8 months ago #70664 by Erebrum
Replied by Erebrum on topic Newbie Questions
I am not sure if i understand your question but when you make structure as i wrote you just make a link Menu - K2 - Category - MAIN(select from the right options), by default K2 will show subcategories as blocks (images and descriptions followed by links to titles).

Sulley said:The point is how to link to CATEGORIES and not to items?. In K2's menu items I can only see: item
item: Create a menu item linking directly to an item in K2.

item listings
category: Displays a list of items from one or more categories.

Nothing that displays and/or link directly to categories. :-S

Erebrum said:1. create 1 "MAIN" category 2. put categories you wanna show in to that category
- MAIN
|_ CAT1
|_ CAT2
|_ CAT3
|_ ....

Then make a menu link which will point to MAIN category, K2 will render blocks of sub-categories at the top followed by articles. Not sure atm. how to get rid of "published in category" part.

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

More
15 years 8 months ago #70665 by Enrico Ardito
Replied by Enrico Ardito on topic Newbie Questions
That's working only if you select ONE category.
Since you can select more than one category (Select one or more categories), I selected other "main" categories but it just displays items and not categories.

My structure is like this:
MAIN 1
|_cat1
|_cat2

MAIN2
|_no sub category

MAIN3
|_no sub category

I've selected MAIN1, MAIN2 and MAIN3 but it just displays items from categories.

Erebrum said:I am not sure if i understand your question but when you make structure as i wrote you just make a link Menu - K2 - Category - MAIN(select from the right options), by default K2 will show subcategories as blocks (images and descriptions followed by links to titles). Sulley said:The point is how to link to CATEGORIES and not to items?. In K2's menu items I can only see: item item: Create a menu item linking directly to an item in K2. item listings
category: Displays a list of items from one or more categories.

Nothing that displays and/or link directly to categories. :-S

Erebrum said:1. create 1 "MAIN" category 2. put categories you wanna show in to that category - MAIN |_ CAT1 |_ CAT2
|_ CAT3
|_ ....

Then make a menu link which will point to MAIN category, K2 will render blocks of sub-categories at the top followed by articles. Not sure atm. how to get rid of "published in category" part.

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

More
15 years 8 months ago #70666 by Erebrum
Replied by Erebrum on topic Newbie Questions
To display categories on page you need to wrap them in category which you will call by menu. This trick works only if you point to ONE category and ONLY then you will see categories as blocks on the page

Maybe i didn't explained on the right way if you have categories MAIN MAIN1 and MAIN2 as top level categories and you wanna to display them as shown on k2.joomlaworks.gr/demo/ you need to WRAP those main categories in one TOP LEVEL category which you then call by menu link

Top level:
MAIN
MAIN1
MAIN2

After WRAP:
NEW TOP LEVEL CAT
MAIN (as sub category )
MAIN1 (as sub category )
MAIN2 (as sub category )

then you point to NEW TOP LEVEL CAT and MAIN , MAIN1 i MAIN2 will be displayed as blocks followed by items from those categories. I hope this is bit clearer.



Sulley said:That's working only if you select ONE category. Since you can select more than one category (Select one or more categories), I selected other "main" categories but it just displays items and not categories.

My structure is like this:
MAIN 1
|_cat1
|_cat2

MAIN2
|_no sub category

MAIN3
|_no sub category

I've selected MAIN1, MAIN2 and MAIN3 but it just displays items from categories.

Erebrum said:I am not sure if i understand your question but when you make structure as i wrote you just make a link Menu - K2 - Category - MAIN(select from the right options), by default K2 will show subcategories as blocks (images and descriptions followed by links to titles). Sulley said:The point is how to link to CATEGORIES and not to items?. In K2's menu items I can only see: item item: Create a menu item linking directly to an item in K2. item listings category: Displays a list of items from one or more categories.

Nothing that displays and/or link directly to categories. :-S

Erebrum said:1. create 1 "MAIN" category 2. put categories you wanna show in to that category - MAIN |_ CAT1 |_ CAT2 |_ CAT3
|_ ....

Then make a menu link which will point to MAIN category, K2 will render blocks of sub-categories at the top followed by articles. Not sure atm. how to get rid of "published in category" part.

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

More
15 years 8 months ago #70667 by Enrico Ardito
Replied by Enrico Ardito on topic Newbie Questions
I've read about the "top level" category trick but that doesn't make sense to me. It means if you want to display ALL categories you'll always have to create a "fake" top level category. It's a nonsense.
The easy way is for Fotis to add "display category" menu item.

Let's say I have this structure:
MAIN 1 (AUDIO)
|_albums
|_singles
MAIN 2 (VIDEO)
|_tour
|_performances

What's the point in having MAIN1 (audio) and MAIN2 (video) under a 'top level' MAIN0 category just to being able to display ALL categories at once?

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

More
15 years 8 months ago #70668 by Erebrum
Replied by Erebrum on topic Newbie Questions
Yeah i know it demands some reconfiguring of structure, but POINT IS that this process is hard coded in V2 stable like that. So far about easy way of coding we can only visit feature request forum :)

Sulley said:I've read about the "top level" category trick but that doesn't make sense to me. It means if you want to display ALL categories you'll always have to create a "fake" top level category. It's a nonsense. The easy way is for Fotis to add "display category" menu item.

Let's say I have this structure:
MAIN 1 (AUDIO)
|_albums
|_singles
MAIN 2 (VIDEO)
|_tour
|_performances

What's the point in having MAIN1 (audio) and MAIN2 (video) under a 'top level' MAIN0 category just to being able to display ALL categories at once?

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

More
15 years 8 months ago #70669 by Enrico Ardito
Replied by Enrico Ardito on topic Newbie Questions
That's really a pity. It seems I should continue with standard joomla's structure for now. :-/
Thanks for the support btw. :-)

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

  • mental
  • mental's Avatar Topic Author
  • Offline
  • New Member
More
15 years 8 months ago #70670 by mental
Replied by mental on topic Newbie Questions
I agree with Sulley, the parent category is a pity but for my purposes it is not too much of a hassle.

However, I do have some more questions.

The first one would be how to get rid of the 'Published in Category Name' under each item.

The second would be to remove the 'View Items' under each category.

My third question would be how exactly to change the colored background for each category pic and so.


Any help is greatly appreciated.

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

More
15 years 8 months ago #70671 by Erebrum
Replied by Erebrum on topic Newbie Questions
I read somewhere around here about Published in - fix was to remove it from template. Same stuff could be applied to View items...
Colored background for each category pic? Do you mean on colored category blocks(light blue) or exactly on cat pictures in those blocks(white space with a border around pictures) - in any case it would be change in CSS.

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

  • mental
  • mental's Avatar Topic Author
  • Offline
  • New Member
More
15 years 8 months ago #70672 by mental
Replied by mental on topic Newbie Questions
I went to modules/mod_k2_content/tmpl/Default/ ... downloaded default.php ... Searched for a place where i could remove both 'Published in' and 'View Items' ... No trace of a place where that can be done.

As for the CSS part - indeed I want to change the ligh blue background to get it more in line with the my general theme. Where could I find the CSS to change. any pointers as to how to do it would be greatly apprecuated too.


Thank you.

Erebrum said:I read somewhere around here about Published in - fix was to remove it from template. Same stuff could be applied to View items... Colored background for each category pic? Do you mean on colored category blocks(light blue) or exactly on cat pictures in those blocks(white space with a border around pictures) - in any case it would be change in CSS.

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

More
15 years 8 months ago #70673 by Erebrum
Replied by Erebrum on topic Newbie Questions
About CSS for subcategory blocks class is - subCategory. If you check code - div class="subCategory"

Default styling should be:
div.subCategory {
background:#CCCCCC none repeat scroll 0 0;
border:1px solid #DDDDDD;
margin:4px;
padding:8px;
}
Location of css file is your site/components/com_k2/css/style.css - line 295.

For view items link look in default template folder or override folder if you are using other template - file category.php line 104 - 107

-- Subcategory more...
a class="subCategoryMore" href="php echo $subCategory->link;
php echo JText::_('View items...');
a

and for published in in category view items file is category_item.php also in template folder, lines 178-181

div class="catItemCategory"
span php echo JText::_('Published in'); /span This is published in part
a href="php echo $this->item->category->link; php echo $this->item->category->name a this is link and name of Category
div

it is maybe bit confusing but i stripped <>/? signs just to prevent this forum for parsing code look at pointed lines in files for full code, so basicly you can comment out view items and published in category parts.








mental said:I went to modules/mod_k2_content/tmpl/Default/ ... downloaded default.php ... Searched for a place where i could remove both 'Published in' and 'View Items' ... No trace of a place where that can be done. As for the CSS part - indeed I want to change the ligh blue background to get it more in line with the my general theme. Where could I find the CSS to change. any pointers as to how to do it would be greatly apprecuated too.
Thank you.

Erebrum said:I read somewhere around here about Published in - fix was to remove it from template. Same stuff could be applied to View items... Colored background for each category pic? Do you mean on colored category blocks(light blue) or exactly on cat pictures in those blocks(white space with a border around pictures) - in any case it would be change in CSS.

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

  • mental
  • mental's Avatar Topic Author
  • Offline
  • New Member
More
15 years 8 months ago #70674 by mental
Replied by mental on topic Newbie Questions
Thank you for all your help. I actually came on to report that I had found it and to show how it was done and I saw your answer. Thanks so much.

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


Powered by Kunena Forum