Webmastersite.net
Register Log In

Search url

Comments on Search url

babrees
Expert

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

Total Topics: 391
Total Comments: 1303
babrees
Posted Sep 29, 2009 - 6:41 AM:

I LOVE this script!

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

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

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

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Sep 29, 2009 - 6: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

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

Total Topics: 391
Total Comments: 1303
babrees
Posted Oct 13, 2009 - 8: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 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

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Oct 16, 2009 - 5: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
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



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