Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-10-28 22:09:19

berchman
New Member
Registered: 2005-03-02
Posts: 7

Formatting search results

Hi,
When a visitor searches for something using the search form built into the page, I would like the results page to reiterate the word or phrase submitted and the number of results.

For example if the visitor searched for “test” on the results page it would say at the top:

There were 36 hits for the search term “test”:

(then proceed to display them all).

How with TXP can I achieve this? Do I need a plugin?

Thanks,
Bert

Offline

#2 2005-10-28 23:03:01

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Formatting search results

You can do the results count but I don’t know about picking up the original search terms.


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#3 2005-10-29 01:09:35

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Formatting search results

It’s not a “real” tag (it just has the contents of the query, doesn’t do anything else), but it does work and I use it:

You searched for: <txp:q />

Offline

#4 2005-10-31 16:00:32

berchman
New Member
Registered: 2005-03-02
Posts: 7

Re: Formatting search results

I’ve tried both of these methods and I get no results with teh “count.”

For whatever reason it will not display the number of articles found with the search term present.

Anyone have a suggestion to troubleshoot this?

Many thanks!

Offline

#5 2005-10-31 16:06:07

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Formatting search results

May need this.

Offline

#6 2005-10-31 16:07:37

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Formatting search results

You need an article tag with pgonly=1 before the count. Read Zem’s article.

Edit: late again :)

Last edited by doggiez (2005-10-31 16:08:11)

Offline

Board footer

Powered by FluxBB