Guest
14 Jan 2013 15:02

I know this has been asked for Co7, but I thought I would get an update with how this applies to Co8.

I need to build an advance search that has related fields.

This could happen 2 ways.

1):

The first drop down will have 2 options.

The 2nd drop down will only show results that pass the first option.

The 3rd drop down will only show results that pass the first 2 options.

Filtering or narrowing down as you go.

2)The search could contain check boxes that you can select from and hit search. Showing only results that match all checked options.

Do you have a filter/ module to do this advanced search? Or how would I go about this in Co8? Is Module - Filters the solution, I could not tell as this module has no description. http://www.mintjoomla.com/downloads/item/13-modules/173-module-filters.html

Thanks in advance.

Last Modified: 02 Mar 2014


Sergey
Total posts: 13,748
15 Jan 2013 00:21

I added screenshot of this module.

In fact it is simple form like advanced search in Cobalt article list but show inside module.


Guest
15 Jan 2013 08:28

So if the filter module isn't my solution. How would I go about building what I need in Co8? Anybody? Thanks a ton.


Sergey
Total posts: 13,748
15 Jan 2013 09:42

In fact filter module has templates. If you do not like how it looks you always can create new template and style it there.

But you will not get ajax search in any case. Only like fill form and click submit.


Guest
15 Jan 2013 10:15

OK I purchased filter module where do I access the templates?


Sergey
Total posts: 13,748
15 Jan 2013 10:18

Templates are in

modules/mod_cobalt_filters/tmpl/default.php

You may create another file and select it in module parameters oк create template override in

templates/[your-tmpl-name]/html/mod_cobalt_filter/default.php

And it should override default template. Both methods will work.


Guest
15 Jan 2013 14:55

Would you be able to do a quick how to video on this module and the other search features in Co8?


Sergey
Total posts: 13,748
16 Jan 2013 09:05

Just open and see this file

modules/mod_cobalt_filters/tmpl/default.php

If you believe you can improve it to make look better, then make a copy in the same folder and modify it. And then in module parameters you will see your new template. Just chose it.


Sackgesicht VIP
Total posts: 1,636
16 Jan 2013 12:12

First for understanding what the filter module is about:

The module is a frontend module to replicate the advanced search options on pages without cobalt being active.

The filter module has the same functionality as the "advanced search", just that you can include it on any page in your Joomla installation through the module position and the module assignment. The search itself will bring you to the section with you defined in the module parameters and process the filter based on your selection.

Now for your filter problem, for me to better understand the scenario:

This dropdown you were refering to, will it affect other fields or is it just a sort of multilevelselect filter for one condition?

Does the dropdown only affect 1 field (checkbox) or does it affect several fields?


Guest
16 Jan 2013 12:20

OK I got it going. Simple oversight. I have been so detailed at finding settings inside Co8 I forgot to go to Extension>Module Manager in joomla and make sure the Module Filter was enabled after install. Now its on and I can access the filter settings from there. I also needed to turn on "Enable Filter" in TYPES>Magange Types>YourTypeHere

Should you still encounter problems at this point read this for more options. http://www.mintjoomla.com/community/knowledge/user-item/43-sergey/165-understanding-cobalt-search.html


Guest
16 Jan 2013 13:20

Sergey is there anyway for the filter or filter module to take on the characteristics of the fields>General Parameters>Sort so check-boxes or drop-downs would be listed in the order of entered or a to Z?


Sergey
Total posts: 13,748
16 Jan 2013 21:47

The whole time I was thinking the module settings would be under Components>Cobalt 8 since that where everything else is. it just didn't dawn on me to check Extension>Module Manager>Cobalt - Module - Filters to adjust its settings. Silly me! If you don't have this module and need to adjust filter settings I believe they are here Sections>YourSectionName>General Parameters Tab>Templates>Markup layout>Filters Tab and Types>Manage Fields>YourTypeName>Form Tab (you are hear by default)>Filtering - General

In fact I could use those settings. But problem is that often you want different settings for module and advanced search. module may have less filters for easier usage. And advanced search has everything.

The whole time I was thinking the module settings would be under Components>Cobalt 8 since that where everything else is. it just didn't dawn on me to check Extension>Module Manager>Cobalt - Module - Filters to adjust its settings. Silly me! If you don't have this module and need to adjust filter settings I believe they are here Sections>YourSectionName>General Parameters Tab>Templates>Markup layout>Filters Tab and Types>Manage Fields>YourTypeName>Form Tab (you are hear by default)>Filtering - General

Sergey is there anyway for the filter or filter module to take on the characteristics of the fields>General Parameters>Sort so check-boxes or drop-downs would be listed in the order of entered or a to Z?

Filters will be ordered by ordering column. Please also note that you may use different templates or input styles for module and advanced search.

Also good thing that in your custom template you may call fields explicitly. It means that in module template you can use

onRenderFilter($section, TRUE);?>

and it will render filter.

You can position them as you like.


Guest
17 Jan 2013 08:57

In fact I could use those settings. But problem is that often you want different settings for module and advanced search. module may have less filters for easier usage. And advanced search has everything.

I agree it should be just like it is, no changes - I just forgot to look in the other place.

In fact I could use those settings. But problem is that often you want different settings for module and advanced search. module may have less filters for easier usage. And advanced search has everything.

Filters will be ordered by ordering column.

I am not wanting to order the filters, but the option inside the drop down to match the order I have them entered in fields>General Parameters>Sort so check-boxes or drop-downs would be listed in the order of entered or a to Z?

So I have this on the form the fill out:

And the items in the drop down in the search are not in the same order:

I would like the items in the drop down to be listed as

Kids

Younger

Middle

Older


Sergey
Total posts: 13,748
18 Jan 2013 06:14

First I wanted to add it. But query already use group by. I made some testes and it become clear that this small feature can definitely affect Cobalt speed. If query will have GROUP BY and ORDER BY at the same time.

So I've decided that this small advantage does not worth to sacrifice speed.

Can you live with it?


Guest
18 Jan 2013 07:44

Yes I can live with it. Is there any manual way I can hard code the order for the result I want without affecting cobalt speed?


Sergey
Total posts: 13,748
19 Jan 2013 07:20

May be possible to sort array which is result of selecting filter values.


pepperstreet VIP
Total posts: 3,837
19 Jan 2013 07:29

Also good thing that in your custom template you may call fields explicitly. It means that in module template you can use

onRenderFilter($section, TRUE);?> 

and it will render filter. You can position them as you like.

I remember, we had a little conversation on first alpha release. You mentioned that those "field-keys" are no longer used or required in Cobalt8. We talked about backend field manager, and the "key" row. I asked for a copy-to-clipboard" function to get this value easily... as far as i remember it.


Sergey
Total posts: 13,748
20 Jan 2013 01:36

Fill code would be

$key = $this->fields_keys_by_id[12];

echo $this->filters[$key]->onRenderFilter($section, TRUE);

Powered by Cobalt