Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2009-04-14 21:19:20
- progre55
- Member
- Registered: 2006-05-02
- Posts: 668
Search
I know I should know this one, but all I am trying to do is return results for a search.
PAGE
<txp:search_input label=“Search” section=“search_test” button=“Search” size=“15” wraptag=“p” />
search_test points to this PAGE:
<txp:if_search>
<h3>Search results</h3>
<p>You searched for <strong><txp:search_term /></strong>.</p>
<txp:article_custom form=“searchResults” />
</txp:if_search>
searchResults FORM:
<h3><txp:search_result_title /> <txp:search_result_date /></h3>
Unfortunately, when I run a search, it returns all of the articles. Even when I run a search with gibberish in it, it returns every article. The only time it does not return every article is if I run a blank search.
FYI, It does give me the correct search term in the title.
Any assistance would be appreciated.
progre55
Last edited by progre55 (2009-04-14 21:20:47)
Offline
Offline
#3 2009-04-14 21:31:00
- progre55
- Member
- Registered: 2006-05-02
- Posts: 668
Re: Search
Use I just use <txp:article/> instead of <txp:article_custom/> it returns nothing :(
Offline
#4 2009-04-14 21:38:34
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Search
Nothing at all? Can you post a tag trace of such a page? (using <txp:article />
! article_custom definitely won’t work)
Offline
Re: Search
progre55 wrote:
<txp:article_custom form=“searchResults” />
Don’t you need <txp:article searchform="searchResults" />
? I’m a little fuzzy on the whole form/searchform/listform thing. Seems like the latter two are superfluous since TXP knows which ‘mode’ it’s in, but I’m sure I’ve tried stuff like this in the past and for some reason I got nothing out when I was using the form
attribute, but switching to searchform
worked. *shrug*
Last edited by Bloke (2009-04-14 21:54:07)
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
#6 2009-04-14 22:15:14
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Search
Bloke wrote:
Don’t you need
<txp:article searchform="searchResults" />
?
Doh! Good to see at least someone is still awake :)
Offline
#7 2009-04-15 16:18:23
- progre55
- Member
- Registered: 2006-05-02
- Posts: 668
Re: Search
jm/Bloke/Els:
I definitely do not know what I would do without your support. Its funny what happens when you put searchforms instead of form – it actually works …
Thanks for all the help.
progre55
Last edited by progre55 (2009-04-27 21:17:52)
Offline
Pages: 1