Custom Template Question

This is an archive of old posting to the User Forum

Custom Template Question

Postby Andy » Mon Aug 05, 2002 10:58 pm

Hi all,

Is there a way in a custom template to create a back button that links back
to the original referring page?

I used an anchor with an [A HREF="javascript:history.go(-1)"]Return To
Previous Page[/A] , the problem is it users the browsers history rather than
going back to the original page. This works great if the person isn't coming
out of the shopping cart screens (because if they hit the Return To Previous
link I created it takes them back to the cart).

An example of what I'm trying to do:

I have a page called accessories, that lists 10 or so products. The user
sees a widget he wants and clicks the widget's "more info" button. They go
to a more info page. Is there code or a custom shopsite tag that can take
them back to the original back to the original accessories page without
relying on the browsers history?

I hope I'm explaining this okay, since I'm feeling very stupid right now :-)

Thanks,

Andy
Andy
 

Re: Custom Template Question

Postby loren_d_c » Tue Aug 06, 2002 8:58 am

If your products are only listed on one page each (for the most part)
then this could easily be done by setting a VAR variable in a custom
Page template that contains the page filename, and then recalling this
VAR in the custom product template's more info page section to create a
link back to that filename.

-Loren



Andy wrote:
Hi all,

Is there a way in a custom template to create a back button that links back
to the original referring page?

I used an anchor with an [A HREF="javascript:history.go(-1)"]Return To
Previous Page[/A] , the problem is it users the browsers history rather than
going back to the original page. This works great if the person isn't coming
out of the shopping cart screens (because if they hit the Return To Previous
link I created it takes them back to the cart).

An example of what I'm trying to do:

I have a page called accessories, that lists 10 or so products. The user
sees a widget he wants and clicks the widget's "more info" button. They go
to a more info page. Is there code or a custom shopsite tag that can take
them back to the original back to the original accessories page without
relying on the browsers history?

I hope I'm explaining this okay, since I'm feeling very stupid right now :-)

Thanks,

Andy
loren_d_c
 
Posts: 2571
Joined: Fri Aug 04, 2006 12:02 pm
Location: Anywhere

Re: Custom Template Question

Postby Andy » Tue Aug 06, 2002 11:34 pm

Thanks. That did the trick!!

Andy

"Loren" <loren_d_c@yahoo.com> wrote in message
news:3D4FF237.F55F48D1@yahoo.com...
If your products are only listed on one page each (for the most part)
then this could easily be done by setting a VAR variable in a custom
Page template that contains the page filename, and then recalling this
VAR in the custom product template's more info page section to create a
link back to that filename.

-Loren



Andy wrote:

Hi all,

Is there a way in a custom template to create a back button that links
back
to the original referring page?

I used an anchor with an [A HREF="javascript:history.go(-1)"]Return To
Previous Page[/A] , the problem is it users the browsers history rather
than
going back to the original page. This works great if the person isn't
coming
out of the shopping cart screens (because if they hit the Return To
Previous
link I created it takes them back to the cart).

An example of what I'm trying to do:

I have a page called accessories, that lists 10 or so products. The user
sees a widget he wants and clicks the widget's "more info" button.
They go
to a more info page. Is there code or a custom shopsite tag that can
take
them back to the original back to the original accessories page without
relying on the browsers history?

I hope I'm explaining this okay, since I'm feeling very stupid right now
:-)

Thanks,

Andy
Andy
 


Return to User Forum Archive

Who is online

Users browsing this forum: No registered users and 35 guests