HowTo: Filters on Taxonomy fields
Hi everyone,
I would like someone to help me with this topic. I can't find a solution myself.
I have EXISTING catalog which I port to brilliant TL & Catalog & Catalog Ext. I spent hours on manipulating data, setting up fields etc. Once I got to categories, which is the taxonomy field, I found the problem with filter. The taxonomy fields does not show up in filter options. How do I create simple drop-down or links collection filter for the categories (taxonomy). There are only a few of them but still...
Please advice. Any tip would be appreciated,
Thanks,
Arthur
Re: HowTo: Filters on Taxonomy fields
It creates a list ONLY from the existing items in the database and hides fields without any items associated with it.
Re: HowTo: Filters on Taxonomy fields
Hi Thyon,
Thanks for your reply. Please correct if I'm wrong - the taxonomy field generated read only drop-down in a back-end to edit item but, at the same time, is is excluded from filters. It means, as I understand it it, that it is impossible to create filter on taxonomy field. Right? If so, what's the solution you would suggest here? Switch to select field and rework data (I need it to be done)?
Ta,
Arthur
PS.
Minor issue - I found <h3><label>..</label></h3> to be hard coded in filter module. Well, literally it's okay since <label> is inline element, but it may (and it has in my case) cause styling confusions. Is there any chance to remove it and stay with <label> which should be enough for inputs? Would be fantastic. Ta.
Re: HowTo: Filters on Taxonomy fields
No of course not, e.g. SELECT field can take its source from tl_taxonomy (Taxonomy) and then in the Front-End, you can set this field to have a FILTER (of couse) and ALSO say a SELECT drop-down (or link list, or radio button). This then appears are you've configured it, but it ONLY shows tl_taxonomy items, if your catalog actually has items associated with that option, e.g. if you don't have any category=cars then the drop-down in the filter won't show "cars" because there are no items for that category, so its pointless to filter on it, as there will be no results.
The Catalog Filter is completely customisable in the front-end, so you can use the filter_widget.tpl as an example, to see all the widget elements stores in an array that you can output in any way you like. This means you don't have to choose the default widgets I've created, you can create your own widgets to display the filter.
Re: HowTo: Filters on Taxonomy fields
Brilliant! Now it works like expected. Have a look: http://drzewkafischer.pl/index.php/katalog-roslin.html. The solution was to use select field (based on tl_taxonomy) instead of taxonomy which cannot be filtered in a front end.
Thanks Thyon for your help.
Arthur
Re: HowTo: Filters on Taxonomy fields
Hi,
I have a jobs listing catalog, I have two filters on it, one for region (job location) and one for sector (sales, It, etc). I use the taxonomy module with the select option looking at the tl_taxonomy table for options.
when i filter by region in the front end it only shows results in this area. great. but if you then go to filter further all options in sector filter dropdown are availiable even if there are only 2 sectors in the database.
Have i not understood something in this post properly as i've tried to find a way to only show options actually availiable in the filter dropdown.
Thanks
Ben
Re: HowTo: Filters on Taxonomy fields
By default it only displays options that are available in the database, it does not show items in a filter if there are no catalog items in it. The only exception would be, if you have enabled a CUSTOM filter in the condition clause, which will NOT pre-filter the items by that filter for the options list, as the CUSTOM filter is entered in the Catalog List, so the Catalog Filter doesn't know about it.
Re: HowTo: Filters on Taxonomy fields
Hi,
After a bit of playing around found I hadn't checked the tree filter box in the filter for these two categories. Doing this only listed taxonomy items availiable.
Jobs is now a good un!
Cheers