Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
[request] Search with constraints (custom field is, is not, is in between…)
Textpattern search allows you to search for anything in the title or body. Wet_haystack
expands that to whatever you want. However, is it possible to say “show all articles that have a custom field with content that is between 300 and 599”.
I am pretty sure there is something out there (but can’t remember the name) that allows you to limit searches by custom field (if it equals bla), but nothing that allows you say “if the value is between a and b”.
Thought of scripting it with php and smd_query
, but maybe there is a better way to do it… (read:easier)
Offline
Re: [request] Search with constraints (custom field is, is not, is in between…)
dl33 wrote:
is it possible to say “show all articles that have a custom field with content that is between 300 and 599”.
Does this smd_if technique help?
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: [request] Search with constraints (custom field is, is not, is in between…)
smd_if
does help, however I am afraid that it might be a little inefficient as there will be quite a few entries in that particular section. (Bytheway, this is also a real-estate site.;-)
Pretty sure that smd_query
can do the job, just thought it is worth asking whether there is anything else…
Offline