XF 2 Have to choose one prefix from some groups?

Robert9

Well-known member
We still have no real search for fields. There are only the filter addons
Now i think about how it would be to have the selection of multi-prefixes (from XON),
but with some rules to choose from several group as radio or checkbox.

1. radios

My car is
BMW
Mercedes
Porsche

The color is

red
blue
green

The car is
new
old

Show me all old mercedes in red!


For fields with "from to", i would prefer radios like 2000-5000, 5001 till 8000
not perfect, but in some cases ok.


2. To use checkboxes

My car has
2 doors
4 wheels
a radio

Show me all old mercedes in red with 2 doors, 4 wheels and a radio


How we could build something like that?

1. set up groups (have an id)
2. save info about that group/id like
  • one from xyz (radio)
  • at least 2, max 4 (check with min/max) from abc

=> group xyz => radio
=> group abd => check,2,4

3. Then we would need forms to add, edit them per group as select or multi-select,
radios or checkboxes.


To use a lot of prefixes we could use a sidebar in thread_list


But
are the prefixes (with multi_prefix addon) the right way to make some more complicated queries?


Show me all

old
mercedes
in red
with 2 doors
4 wheels
a radio
age 2-5 years
price 2000-5000

means something like (i dont know how prefix_ids are saved)

select * from where prefix_id IN (1,2,3 ... 8 numbers) AND
where
prefix_ids like "%1,%" AND
prefix_ids like "%2,%" AND
prefix_ids like "%3,%" AND
...

Is this a good way at all?
 
Top Bottom