Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
how to limit the search to section, category and/or custom field?
hi,
how to limit the search to section, category and/or custom field?
I know article_custom can display articles limited to section, category and/or custom field. But that’s the story when we use the tag article_custom when designing a page. for example, if i have http://localhost/textpattern/sectionA/
, in this case, i could use articles_custom tag display articles limited to section, category and/or customfield.
but i want it in form of search url? could i do that using TXP’s default search?
i have:
http://localhost/textpattern/sectionA/
<- display sectionA
http://localhost/textpattern/sectionA/?c=categoryA
<- display category A in sectionA
but they are not flexible! how about custom_field?
thank you.
Last edited by HAC (2009-12-18 14:35:15)
Offline
Re: how to limit the search to section, category and/or custom field?
i have read the tips for limit the search to a section, but that is not in my case, i want an url to reflect the search
bc.<txp:article searchall=0 /> on the page template for the section you want to search, and <txp:search_input section=“mysection” /> to display the form.
Offline
Re: how to limit the search to section, category and/or custom field?
You can use txp if in the search form.
You put in search form some input to record custom_field or/and category to limit, then in form search get thoses informations (using adi_gps for ex) and use them like this:
<txp:if_category name='<txp:variable name="thecategory/>' >
<txp:title />
</txp:if_category>
Cheers
Offline
Re: how to limit the search to section, category and/or custom field?
wow, tks so much! problem solved!
Offline