Latest Register Log In

+ Advanced Search

Linking to Search Results

Linking to Search Results
By
Nov 30, 2004 (Edited Feb 10, 2014)

In WSN 9.0 or later, the bottom of the search results page has a handy option to encourage people to link to the results page. For earlier versions, or if you've removed the linking area from your template, read on to learn how to get a link to a search result page.

Search results pages can be linked using a URL like this:
search.php?filled=1&whichtype=listings&condition=and&search=term

Repace 'term' with the search term you want to show results for -- be sure to URL-encode spaces as %20. Change each of the other terms as you desire as well. For example, to show links that contain the full phrase "WSN Links" you would use
search.php?filled=1&whichtype=links&condition=like&search=WSN%20Links

Written out as HTML, the link becomes
<a href="search.php?filled=1&whichtype=links&condition=like&search=WSN%20Links">Click here to see comments about WSN Links</a>

To search only in a particular field, use a url like
search.php?action=filter&filled=1&whichtype=categories&namesearch=test&namecondition==


Alternately, you can get your search URL by chaning all instances of method="POST" to method="GET" in the "Advanced Search" template at Admin Panel -> Themes -> Manage Templates... after making that template change, simply run your search from the advanced search page as a user and copy the results page URL from your web browser's address bar

If it's a listings search and you want it to go to the first matching result's details page when clicked -- skipping the search results page entirely -- you can add an &feelinglucky=1 parameter to the end of the URL to do that. This works like google's "I'm Feeling Lucky" button.




Description Using a simple link to point people at the search results for a particular term.
Rating
Views 2,189 views. Averaging 0 views per day.
Similar Listings