Forums / General Questions / Please help me correct these links...

Please help me correct these links...

Locked

Views: 1,742

Results 1 to 17 of 17
This thread is locked. New replies are disabled.
7 Feb 2009, 2:38 PM
#1
jenzi avatar

jenzi

Zen Follower

Join Date:
Jan 2007
Posts:
145
Plugin Contributions:
0

Please help me correct these links...

My "a name" links are going back to the index page instead of the relevant anchors in the page... could someone please tell me why this is happening? Thanks!

Here is the page in question

7 Feb 2009, 5:19 PM
#2
tony_sar avatar

tony_sar

Totally Zenned

Join Date:
Jul 2006
Location:
Montreal, Canada
Posts:
2,276
Plugin Contributions:
0

Re: Please help me correct these links...

im not sure how you did create that page , either is define page or easy page .. but you can try to use code like this to see if is going to work

<a href="<?php echo $_SERVER['REQUEST_URI']; ?>#ordering">

if you only create anchor like #ordering .. you end up in main page ..

but REQUEST_URI , will host the path of current page and #ordering will be appended to the end and i guess it should work .

7 Feb 2009, 8:36 PM
#3
jenzi avatar

jenzi

Zen Follower

Join Date:
Jan 2007
Posts:
145
Plugin Contributions:
0

Re: Please help me correct these links...

That worked!!! Thank you so much!

(It's a define page as an EZ page link)

12 Feb 2009, 7:50 PM
#4
creative avatar

creative

New Zenner

Join Date:
Jul 2005
Posts:
85
Plugin Contributions:
0

Re: Please help me correct these links...

This helped me as well. Thank you!

9 Apr 2009, 12:15 AM
#5
customk1 avatar

customk1

Zen Follower

Join Date:
Mar 2009
Location:
Cornelius, NC
Posts:
334
Plugin Contributions:
0

Re: Please help me correct these links...

hmmm... not working for me...

i have this:

<li><a href="<?php echo $_SERVER['REQUEST_URI'];
 ?>#chicago">Why Chicago Screws?</a></li>

calling this further down the page:
[CODE<b><i><a name="chicago">Why Chicago Screws?</a></i></b><br />[/CODE]

when i click on the link i get this error:

Not Found
The requested URL /catalogzen/< was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/1.3.41 Server at customk9design.com Port 80

any thoughts on these hotlinks/anchors?

"Be the Change you wish to see in the World..." -Gandhi

14 Apr 2009, 3:59 AM
#6
customk1 avatar

customk1

Zen Follower

Join Date:
Mar 2009
Location:
Cornelius, NC
Posts:
334
Plugin Contributions:
0

Re: Please help me correct these links...

bump

any suggestions as to why the standard internal anchor link isnt working??

thanks!!

"Be the Change you wish to see in the World..." -Gandhi

14 Apr 2009, 4:13 AM
#7
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,857
Plugin Contributions:
18

Re: Please help me correct these links...

customk1:

<li><a href="<?php echo $_SERVER['REQUEST_URI']; ?>#chicago">Why Chicago Screws?</a></li> ```calling this further down the page: > [CODE<b><i><a name="chicago">Why Chicago Screws?</a></i></b><br />\[/code] Make sure there's not a carriage return, space, or line break between *URI'];* and *?>#chicago*

That might be it.

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

14 Apr 2009, 4:27 AM
#8
tony_sar avatar

tony_sar

Totally Zenned

Join Date:
Jul 2006
Location:
Montreal, Canada
Posts:
2,276
Plugin Contributions:
0

Re: Please help me correct these links...

php echo is not being parsed .. just being out put as php .. so there is something wrong when you enter your php code .. looking at the source opening tag is converted to different character <?

also , you can see for some reason , your admin folder is being added to URL .. no idea why .. but thats what is being out put as anchor link .

14 Apr 2009, 4:45 AM
#9
customk1 avatar

customk1

Zen Follower

Join Date:
Mar 2009
Location:
Cornelius, NC
Posts:
334
Plugin Contributions:
0

Re: Please help me correct these links...

tony, im not sure if its just that its almost 1am or that im just a noob... but i seriously didnt understand a word of that... lol.

what i did want to point out though, is that in the ezpages editor on zencart, i entered the link as this:

<a href="#chicago">Why Chicago Screws?</a>

the other stuff http://customk9design.com/catalogzen/admin/%3C?php echo $_SERVER['REQUEST_URI']; ? was added by the ezpages editor as some sort of interpretation of what i wrote...

i was just using the basic info from w3schools.org:

The name Attribute
When the name attribute is used, the <a> element defines a named anchor inside a HTML document.
Named anchor are not displayed in any special way. They are invisible to the reader.
Named anchor syntax:
<a name="label">Any content</a>
The link syntax to a named anchor:
<a href="#label">Any content</a>
The # in the href attribute defines a link to a named anchor.

so, what made the ezpages editor change my request to this?

<a href="http://customk9design.com/catalogzen/admin/%3C?php echo $_SERVER['REQUEST_URI']; ?>#chicago">Why Chicago Screws?</a>

"Be the Change you wish to see in the World..." -Gandhi

14 Apr 2009, 5:15 AM
#10
tony_sar avatar

tony_sar

Totally Zenned

Join Date:
Jul 2006
Location:
Montreal, Canada
Posts:
2,276
Plugin Contributions:
0

Re: Please help me correct these links...

your editor is not capable of handling PHP tags ???? some editor will alter script tags unless they are enabled within their configuration setting ..

14 Apr 2009, 3:21 PM
#11
customk1 avatar

customk1

Zen Follower

Join Date:
Mar 2009
Location:
Cornelius, NC
Posts:
334
Plugin Contributions:
0

Re: Please help me correct these links...

for this page, because im using it on an ezpage... its just the html editor of zencart admin...

i have access to other editors... but wasnt using them for the ezpage creation...

your suggestions?

"Be the Change you wish to see in the World..." -Gandhi

14 Apr 2009, 6:54 PM
#12
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,857
Plugin Contributions:
18

Re: Please help me correct these links...

Google free html editor and watch out for free download but $19.95 a month to use.:unsure:

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

14 Apr 2009, 7:02 PM
#13
customk1 avatar

customk1

Zen Follower

Join Date:
Mar 2009
Location:
Cornelius, NC
Posts:
334
Plugin Contributions:
0

Re: Please help me correct these links...

ok, so my point is... no matter what i use to edit, it gets changed by the ezpages program... i have dreamweaver i could use... but that doesnt fix the problem... when i paste code into ezpages creator it is mis-construing the data...?

"Be the Change you wish to see in the World..." -Gandhi

14 Apr 2009, 8:41 PM
#14
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,857
Plugin Contributions:
18

Re: Please help me correct these links...

Dreamweaver is worse.
Why not just point to an external page you've edited?

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

14 Apr 2009, 9:17 PM
#15
customk1 avatar

customk1

Zen Follower

Join Date:
Mar 2009
Location:
Cornelius, NC
Posts:
334
Plugin Contributions:
0

Re: Please help me correct these links...

i just want it to move further down the page... for example, i dont want the customer to ahve to scroll all the way down for a sizing chart, if thats what they want, they click the link at the top and it just transports them lower on the same page... its used a lot... i just am not doing something quite right with this as an ezpage...

"Be the Change you wish to see in the World..." -Gandhi

14 Apr 2009, 9:31 PM
#16
tony_sar avatar

tony_sar

Totally Zenned

Join Date:
Jul 2006
Location:
Montreal, Canada
Posts:
2,276
Plugin Contributions:
0

Re: Please help me correct these links...

i guess the problem is that you are using EZpages .. and reading other thread , you can not add php code into ezpages.

you better off using a define page ..

14 Apr 2009, 9:51 PM
#17
customk1 avatar

customk1

Zen Follower

Join Date:
Mar 2009
Location:
Cornelius, NC
Posts:
334
Plugin Contributions:
0

Re: Please help me correct these links...

tony, thanks for your post! when you mentioned that it could just be an ezpage issue... it got me thinking, and i changed my keyword searching in the forums a bit, and finally came up with this post! its just the fix i needed... so easy!

http://www.zen-cart.com/forum/showthread.php?t=36999&page=2

Thanks for the post sketman. It is not the editor causing the problem, rather the path to the anchor. In a normal html page the anchor would be not need a url since it is referencing the same page. But in a dynamic site, the url is generated dynamically and the path to the page is dynamic. Therefore, to get anchors to work in ezpages, you need to first know the database id and then use this prefixed before the anchor tag. To do this first add the page to ezpages so it gets and ID. Load this in the browser, copy the url then add the anchor tag at the end of this url. Go back into ezpages and adjust the anchor tags link to suit the new path. Just remember to update this path if ever you change the database id for the ezpage content

basicallly, just have to put the full path before #chicagoscrews... so simple!

thanks again.

"Be the Change you wish to see in the World..." -Gandhi