Keyword

I want to display a category showing it´s sub-categories and their items below each subcategory

  • Elisa F.
  • Elisa F.'s Avatar Topic Author
  • Offline
  • Junior Member
More
14 years 1 week ago #88519 by Elisa F.
Hi there!
The output of a Category is like this:
-Category-
-Subcategory 1-
-Subcategory 2-
-Subcategory 3-
-Subcategory 4-
-Items of Subcategories 1-4 -

But i want to have it this way:

-Category-
-Subcategory 1-

-Items of Subcategory 1 -

-Subcategory 2-
-Items of Subcategory 2 -
-Subcategory 3-
-Items of Subcategory 3 -
-Subcategory 4-

-Items of Subcategory 4 -

Anyone an idea how to solve?

Thank you!

Elisa

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

  • Yiota
  • Yiota's Avatar
  • Visitor
14 years 1 week ago #88520 by Yiota
You can use the Latest items from (one or more) users or categories menu type. The drawback with that is that you cannot change the ordering of the items. They are shown depending on the most recent first.

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

  • Elisa F.
  • Elisa F.'s Avatar Topic Author
  • Offline
  • Junior Member
More
14 years 1 week ago #88521 by Elisa F.
Thank you, it´s almost shown now like i wanted to but if i set 3 Colums it´s shown like that:

-Category-
-Subcategory 1- -Subcategory 2- -Subcategory 3-
-Items of Subcategory 1 - -Items of Subcategory 2 - -Items of Subcategory 3 -

and i need it like
-Subcategory 1-
-Items of Subcategory 1 - column 1 | column 2 | column 3
-Subcategory 2-
-Items of Subcategory 2 -
-Subcategory 3- - column 1 | column 2 | column 3
-Items of Subcategory 3 -
-Subcategory 4- - column 1 | column 2 | column 3
-Items of Subcategory 4 -


maybe it´s just another setting but i don´t know...

thanks!

Elisa

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

More
14 years 1 week ago #88522 by Jiliko.net
Hi Elisa,

You can do that :

- Override the default itemlist view (cf community.getk2.org/notes/Templating_in_K2)
- Use the itemlist view (category), configuring ordering, categories,...and take you new K2 template
Edit your template itemlist default.php and add some php code to reorganize the items list by subcategories + Html to display as you want.

I know it's not so easy to do if you don't have php experience but it's possible...

Don't have time now to make it for you but i will try asap if you want...

Olivier

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

  • Elisa F.
  • Elisa F.'s Avatar Topic Author
  • Offline
  • Junior Member
More
14 years 1 week ago #88523 by Elisa F.
Hi Olivier!

Thanks, i´ll try this and maybe i may take you up on it some time.
greetings

Olivier Nolbert said:Hi Elisa,
You can do that :

- Override the default itemlist view (cf community.getk2.org/notes/Templating_in_K2)
- Use the itemlist view (category), configuring ordering, categories,...and take you new K2 template
Edit your template itemlist default.php and add some php code to reorganize the items list by subcategories + Html to display as you want.

I know it's not so easy to do if you don't have php experience but it's possible...

Don't have time now to make it for you but i will try asap if you want...

Olivier

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

More
13 years 10 months ago #88524 by Mike Brogan
Hi, I'd like to achieve the same thing but I'm a novice with PHP. Would you (or anyone) be willing to share the code to make this work?


Elisa F. said:Hi Olivier! Thanks, i´ll try this and maybe i may take you up on it some time.
greetings

Olivier Nolbert said:Hi Elisa, You can do that :
- Override the default itemlist view (cf community.getk2.org/notes/Templating_in_K2)
- Use the itemlist view (category), configuring ordering, categories,...and take you new K2 template
Edit your template itemlist default.php and add some php code to reorganize the items list by subcategories + Html to display as you want.

I know it's not so easy to do if you don't have php experience but it's possible...

Don't have time now to make it for you but i will try asap if you want...

Olivier

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


Powered by Kunena Forum