with the search module, is there a way to create a link back to the search results page? instead of clicking on the back button of the browser window?
thanks
linking back to search results
Re: linking back to search results
You can always add your own back-button in your template
But then the link will show on the page regardless of whether a visitor came by searching or not.
In any case, don't underestimate your visitors, most surfers know how to use the back-button. It is always a good GUI design strategy to allow users to use what they are used to
Code: Select all
<a href="javascript:history.go(-1)"> [Go Back]</a>
In any case, don't underestimate your visitors, most surfers know how to use the back-button. It is always a good GUI design strategy to allow users to use what they are used to

Re: linking back to search results
There is a elegant way to solve it
It´s possible to show the "back to results" link only when the user came from a search results page.
If you´re interested, let me know.
Regards
It´s possible to show the "back to results" link only when the user came from a search results page.
If you´re interested, let me know.
Regards
-
- Forum Members
- Posts: 106
- Joined: Thu Oct 05, 2006 11:27 am
Re: linking back to search results
Hi viebig,
I'm not the original poster but....
I would be very interested in your elegant solution for a 'back to search results' link.
Can you possibly let me know?
Many thanks,
Rachael
I'm not the original poster but....
I would be very interested in your elegant solution for a 'back to search results' link.
Can you possibly let me know?
Many thanks,
Rachael
Re: linking back to search results
Sure Rachel... let´s use one UDT
Name it backsolution
Then use it like that on your pages
The back button will only show if the last page accessed by the user was from your domain, and if was a direct hit , nothing will appear.
Let me know your thoughts
Name it backsolution
Code: Select all
$url = parse_url($_SERVER['HTTP_REFERER']);
$currenturl = "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
if($url['host'] == $params['site'] && $_SERVER['HTTP_REFERER'] != $currenturl)
{
return '<a href="'.$_SERVER['HTTP_REFERER'].'" title="Back Link">'.$params['text'].'</a> ';
}
Code: Select all
{backsolution site='www.yourdomain.com' text="Go Back"}
The back button will only show if the last page accessed by the user was from your domain, and if was a direct hit , nothing will appear.
Let me know your thoughts
-
- Forum Members
- Posts: 106
- Joined: Thu Oct 05, 2006 11:27 am
Re: linking back to search results
Thanks for getting back to me so quickly!
Unfortunately, this isn't doing exactly what I was looking for. I have put the tag on my default template page and it shows on every page on my site. I would like it to only show on a search result page, to get back to the search results list page.
Any ideas how I could get it to do this???
Thanks again
Rachael
Unfortunately, this isn't doing exactly what I was looking for. I have put the tag on my default template page and it shows on every page on my site. I would like it to only show on a search result page, to get back to the search results list page.
Any ideas how I could get it to do this???
Thanks again

Rachael
Re: linking back to search results
That´s even more simple!
Sorry that I didnt get for the 1st time
update your tag
and now just use param text
And applaud me if it works!
Regards
Sorry that I didnt get for the 1st time
update your tag
Code: Select all
if(strpos($_SERVER['HTTP_REFERER'],"mact=Search") !== false)
{
return '<a href="'.$_SERVER['HTTP_REFERER'].'" title="Back Link">'.$params['text'].'</a> ';
}
Code: Select all
{backsolution text="Return to search results"}
Regards
Last edited by viebig on Tue Feb 03, 2009 3:59 pm, edited 1 time in total.
-
- Forum Members
- Posts: 106
- Joined: Thu Oct 05, 2006 11:27 am
Re: linking back to search results



Spot on - brilliant
Thanks viebig - that's great!
Thanks for taking the time to help with this...
Rachael