Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2007-04-23 10:25:09
- ultramega
- Member
- Registered: 2006-02-26
- Posts: 221
Displaying search results: searched word & result_count
1)
How to show the word user was searching in the result page?
Like: You searched for word: …
2)
When I use search with default settings, tag <txp:search_result_count /> outputs amount of results with the results in the default frontpage. If I want to show result list in other page, I set the “section=“otherpage” in the search form. The results are displayed in desired page, but the count doesn’t work anymore. Why and how to?
Edit…
Just found that the count have to be after result list. Works now. But how about the question one?
Last edited by ultramega (2007-04-23 10:40:28)
Offline
#2 2007-04-23 14:02:03
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Displaying search results: searched word & result_count
You can use <txp:article pgonly="1" />
if you want to use search related tags above your search results. It doesn’t display anything, but tells txp the necessary info about the search and the results.
To display the search query use <txp:q />
.
Here is a very helpful article.
Offline
#3 2007-04-23 15:42:10
- ultramega
- Member
- Registered: 2006-02-26
- Posts: 221
Re: Displaying search results: searched word & result_count
Hi! Thanks!
Damn, I love this TXP-stuff and this helpful forum :)
Offline
#4 2007-07-31 13:23:09
- ooz
- Member
- From: Finland
- Registered: 2007-07-27
- Posts: 14
Re: Displaying search results: searched word & result_count
I’m new here and can only find incomplete tag-lists, can ayone help me find a complete one?
This one for example doesn’t include the <txp:q />
-tag and some other tags are missing, too:
http://textbook.textpattern.net/wiki/index.php?title=Alphabetical_Tag_Listing
“Habit is probably the greatest obstacle of perceiving truth.” R.A. Schwaller de Lubitz
Offline
Re: Displaying search results: searched word & result_count
All the official tags are all listed there. The one you mention isn’t an official tag, as far as I know, so I’d recommend against using it.
Offline
#6 2007-07-31 14:56:23
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Displaying search results: searched word & result_count
…isn’t an official tag, as far as I know…
It isn’t. Don’t use it. Use page_url.
Offline
#7 2007-07-31 15:00:59
- ooz
- Member
- From: Finland
- Registered: 2007-07-27
- Posts: 14
Re: Displaying search results: searched word & result_count
Wow, thanks, that’s exactly what I needed!
=all you need to customize for example a nice search results page :)
“Habit is probably the greatest obstacle of perceiving truth.” R.A. Schwaller de Lubitz
Offline
#8 2007-07-31 18:00:42
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Displaying search results: searched word & result_count
Mary wrote:
It isn’t. Don’t use it. Use page_url.
How is it possible that I completely overlooked the attributes for this tag??? Thank you for pointing it out! And I’ll never advise to use an inofficial tag again ;)
Offline