Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Add a BACK button to an EZ Page?

Add a BACK button to an EZ Page?

Locked

Views: 957

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
28 May 2010, 6:39 PM
#1
thelawman avatar

thelawman

New Zenner

Join Date:
May 2010
Posts:
24
Plugin Contributions:
0

Add a BACK button to an EZ Page?

I thought I could add the following to the bottom of an EZ page I made to get a back button, but all it shows is ’; ?>

<div class="buttonRow back"><?php echo zen_back_link() . zen_image_button(BUTTON_IMAGE_BACK, BUTTON_BACK_ALT) . '</a>'; ?></div>

Any ideas on how to add the 'back' button to an EZ page?

Thanks!

The man who smiles when things go wrong has thought of someone to blame it on. - Robert Bloch

28 May 2010, 9:26 PM
#2
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Add a BACK button to an EZ Page?

It's easier to add a HTML expression in EZPages, because their content is stored in the database and is parsed into the page AFTER the rest of the php compiles it. (There is a work-around, but its complex.)

In your EZPAGE editor screen, toggle to HTML (page code) mode, and put this at the bottom.

If you go a step further and encase it in a <DIV> with an ID, then you can style it in the stylesheet.

<FORM>
<INPUT type="button" value="Click here to go back" onClick="history.back()">
</FORM> 
<div id="myBackButton">
<FORM>
<INPUT type="button" value="Click here to go back" onClick="history.back()">
</FORM> 
</div>

history.go(-1) or history.go(1)
This allows you to determine how far forward or back to take the viewer. Use a minus sign and a number to go back, or just a number to go forward.

20 years a Zencart User

29 May 2010, 3:18 AM
#3
thelawman avatar

thelawman

New Zenner

Join Date:
May 2010
Posts:
24
Plugin Contributions:
0

Re: Add a BACK button to an EZ Page?

Thank you for your response. :smile:

Your method does indeed provide a "Back" button however, what I was wanting to be able to use my button_back.gif so it would match the rest of the pages.

So I ended up doing the following which seems to work. :flex:

<IMG SRC="/includes/templates/MYTEMPLATE/buttons/english/button_back.gif" style="cursor: pointer;cursor:hand" ALT="Back" onclick="history.go(-1)" name="Back" value="Back">

Thanks again for your suggestion and time.

The man who smiles when things go wrong has thought of someone to blame it on. - Robert Bloch

29 May 2010, 3:31 AM
#4
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,185
Plugin Contributions:
0

Re: Add a BACK button to an EZ Page?

Take time to read this thread, it might help out..

http://www.zen-cart.com/forum/showthread.php?t=36455I am not getting the Alt tag with your code above.
Nice clean site, looks sharp..

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.

Zen Cart Certified hosting at myZenCartHost.com.

29 May 2010, 4:36 PM
#5
thelawman avatar

thelawman

New Zenner

Join Date:
May 2010
Posts:
24
Plugin Contributions:
0

Re: Add a BACK button to an EZ Page?

Thank you! :blush:

I added title="Back" and am getting the desired effect.

The man who smiles when things go wrong has thought of someone to blame it on. - Robert Bloch

29 May 2010, 5:19 PM
#6
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,185
Plugin Contributions:
0

Re: Add a BACK button to an EZ Page?

Your Welcome ....:smile:

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.

Zen Cart Certified hosting at myZenCartHost.com.