#1 2016-02-23 16:50:34

Amadego
Member
Registered: 2015-05-19
Posts: 27

Categories organization

Hi all,
I need to know whether is possible or not to organize categories in categories.
Let me explain what I mean.
I have a list of articles about events.
I've created a list of categories, where every category is a department (jewels, watches ...).
Placing the code for categories (found in the tutorial about categories) into my view I can let the user filter articles by departments (jewels, watches ...).
I'd like to let the user filter articles by location. But if I create another category,  Milan for example, into my list of categories, when I loop in the departments categories section I display this last category too.
So, what I'd like to know is if I can have two fathers categories: Departments and Locations. Each has its own children: Departments will have jewels, watches... while Location Milan, Paris ....
The user will be able to filter by departments and by location thanks to two different "Filter" blocks.
Is that possible?
Thanks to all.
Amadego

Offline

#2 2016-03-23 17:31:06

adaliszk
Ionize Friend
From: Germany
Registered: 2010-09-20
Posts: 397
Website

Re: Categories organization

Hello,

You can add type to the articles and then you can filter it with the type="Departments/Locations", also you can create the Departments and Locations category and when you filter it then you can add an AND to it because the filter attribute is SQL also if you using the from_categories then you can add multiple category with coma separated and you can set the condition with from_categories_condition attribute. And if the Departments and Locations are in seperate pages then you can filter the parent_page and the category too.

Best Regards,
Adam Liszkai


Webdeveloper, Programmer, Application developer, Ionize friend
@adaliszk

Offline

#3 2016-03-23 20:03:32

Amadego
Member
Registered: 2015-05-19
Posts: 27

Re: Categories organization

Hi adamos42,
thank you for your reply.
As my site is organized, I don't want to use article type for this use.
What I have is a two columns layout: in the right column I have all articles with type=element-in-list, in the left column I have some link to navigate to other pages.
What I want is to place a box in the left column with all departments; the user can choose one or more departments in order to see only article with the department he has selected, jewels for example.
One or none location and one, none or more departments are attributes of every articles with type element-in-list.

As far as I understand from your reply, I have to create the categories of Departments as "watches, jewels, fabrics", and for Locations as "Milan, Paris, Tokyo"
But in the panel of Categories, in the window for new category, there is Name and then localized attributes section, as Title and Subtitle. I've tried to add Category with name Locations and Title as Milan, Paris but when I go to article X, I can select only category "Locations", not Milan or Paris.
How can I add categories as you suggest?
And then, how can I set one category for article X and another one for article Y?
Can you make some example?
Thank you
Bye
Amadego

Offline

#4 2016-03-23 20:48:58

adaliszk
Ionize Friend
From: Germany
Registered: 2010-09-20
Posts: 397
Website

Re: Categories organization

If you created the two new category then if you go to the article, open the options sidebar then with CTRL you can select multiple category from the categories list. Its a simple multiselect selectbox, also you can use tags for the "sub-categories", but the Location+Milan, Location+Paris... combo should be fine.

In your view if you does not want to show the location and the departments then you can filter it with php or with ion tags.


Webdeveloper, Programmer, Application developer, Ionize friend
@adaliszk

Offline

What's Ionize ?

Ionize is an Open Source Content Management System created by webdesigners for webdesigners.

Created and maintained by Partikule and Toopixel, Ionize wants to be the easiest and most powerful CMS.

Can I help ?

Because talent is nothing without involvement, we are looking for motivated coders and webdesigners to join the project team.

Resources

Website : ionizecms.com
Documentation : doc.ionizecms.com

Development : Ionize on GitHub
Translations : Ionize Translations