WebmasterSite.net

Search url

Version: 5.1.3
URL:

PrintPrint


Search url
babrees
Expert
Avatar

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 392
Total Posts: 1287
quote post #1
Posted 09/29/09 - 3:41 AM:

I LOVE this script!

OK, now I have a link for a search...

search.php?filled=1&whichtype=links&condition=like&search=

This works well but I'd like to refine it more. I want it only to search in LINKTITLE. LINKTITLES are unique so there will only be one link, and I would like the search to open it using the custom template detailsdog.tpl.

Possible?

TIA
Paul
developer
Avatar

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 65
Total Posts: 7614
quote post #2
Posted 09/29/09 - 3:54 AM:

To construct a search URL, what you do is take the input fields submitted in the search template (in this case you want to do an advanced search with just the title filled in) and turn them into url parameters with your desired values filled in.

search.php?action=filter&filled=1&whichtype=links&titlecondition=like&titlesearch={LINKPARENT1}


If detailsdog is a details template you want to use, you'll need to add a custom search template that links to detailsdog with
<a href="link.php?id={LINKID}&action=detail&custom=yes&TID=detailsdog">{LINKTITLE}</a>
. To use the custom search result template just tack &custom=yes&TID=searchdog onto the search url.
babrees
Expert
Avatar

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 392
Total Posts: 1287
quote post #3
Posted 10/13/09 - 5:00 AM:

Thanks Paul.

Paul wrote:

If detailsdog is a details template you want to use, you'll need to add a custom search template that links to detailsdog with
<a href="link.php?id={LINKID}&action=detail&custom=yes&TID=detailsdog">{LINKTITLE}</a>
. To use the custom search result template just tack &custom=yes&TID=searchdog onto the search url.


I don't quite understand this bit, but I have a feeling it isn't quite what I am trying to do.

Yes, detailsdog.tpl is a details template.

On this page http://www.thecanaandog.co.uk/link...&custom=yes&TID=detailsdog there is a pedigree. If you click on, say, Sivan Me Shaar Hagai that searches titles, great! But it shows the result on the search results page (logical!) and you then have to click to go to the details page.

I want it so that when you click on the name it searches and takes you straight to the details page.

Equally if there is no result for that search I want the continue to take you back to the page you clicked from.


Paul
developer
Avatar

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 65
Total Posts: 7614
quote post #4
Posted 10/16/09 - 2:01 AM:

I want it so that when you click on the name it searches and takes you straight to the details page.

Equally if there is no result for that search I want the continue to take you back to the page you clicked from.


A URL option to make it jump to the details page of the first result, and then a returnto value that overrides the after search failure redirect (not sure if the latter will require any change or just the url parameter). I can do this for $60. Please let me know by email if interested.
 
Search thread for
Download thread as


Sorry, you don't have permission to post. Log in, or register if you haven't yet.