I am having trouble getting text anchors to work within a page.
When I click the beginning anchors it takes me back to the home page and adds a "/#" to the end of the URL.
Any ideas on why it is doing this and how I can fix it?
Thanks in advance
Ryan
When I click the beginning anchors it takes me back to the home page and adds a "/#" to the end of the URL.
Any ideas on why it is doing this and how I can fix it?
Thanks in advance
Ryan
It's not the most desirable solution but you can get around it by hardcoding your links to something like:
If you use SEO URLs it's a little easier:
Code: Select all
http://mystore.com/index.php?route=information/information&information_id=8#faq01
Code: Select all
http://mystore.com/faq#faq01
-Ryan
actually this is really not a good idea, and quite a big problem with seo, and the crazy part is it only acts like that if you have seo urls turned on.Qphoria wrote:The controller system is likely trying to read the anchor as a file path. By default if a path isn't found, instead of showing an ugly 404 error, it hides the error and just redirects to the homepage. i'll see what is involved with preventing that
OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter
I have the same problem; the anchor is kicking me back to the homepage. Any resolution???rmeo wrote:Appreciate the help very much!
Look forward to some fixes that can be made.
In an older post Qphoria mentioned that anchor is so 1999 - what can I replace it with when I have a long list of FAQ?
Thanks in advance.
Cheers,
Valentina
rph posted the solution a couple of post above.
OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter
Yeah, this is a solution, but if you are talking about the "Terms and Conditions" page the things come a little more harder...In fact, if we use the friendly url system, it's possible to have anchors working, but in phase of order, if a client (before accept) click on "term and condition", here happens that the poor guy is redirected through the page linked and loose the possibility to go on with the buy. AS the terms and condition page is hosted in a popup window that don't use friendly-url....
At this point I don't know what to do...Any idea?
At this point I don't know what to do...Any idea?
Isn't this a problem with the base href? i.e. the base href on the page is set to the site root so all relative links, including anchors, will start with that.
Here is a jQuery workaround if that's feasible - it worked for me:
http://www.cariboucms.com/blog/jquery-b ... nchors-fix
Here is a jQuery workaround if that's feasible - it worked for me:
http://www.cariboucms.com/blog/jquery-b ... nchors-fix
Works perfectly! Thanks schmadamschmadam wrote:Isn't this a problem with the base href? i.e. the base href on the page is set to the site root so all relative links, including anchors, will start with that.
Here is a jQuery workaround if that's feasible - it worked for me:
http://www.cariboucms.com/blog/jquery-b ... nchors-fix
ThatBlokeRob wrote:Works perfectly! Thanks schmadamschmadam wrote:Isn't this a problem with the base href? i.e. the base href on the page is set to the site root so all relative links, including anchors, will start with that.
Here is a jQuery workaround if that's feasible - it worked for me:
http://www.cariboucms.com/blog/jquery-b ... nchors-fix
Hi there,
Any ideas where I can actually insert the script to make this work?
The source in the wysiwyg doesnt go as far up as header. (sorry bit of a newb)
Mobi
Hello all - just in case anyone else is still struggling with this - I think I've figured it out!
All you need to do is create the anchor as normal for the part of the page you wish to reference and then choose link to URL when you are creating the hyperlink to the anchor, and not link to Anchor.
When you type the URL in just add #anchorname at the end and it seems to work.
Hope this helps someone else.
I'm using vs 1.5.1.
All you need to do is create the anchor as normal for the part of the page you wish to reference and then choose link to URL when you are creating the hyperlink to the anchor, and not link to Anchor.
When you type the URL in just add #anchorname at the end and it seems to work.
Hope this helps someone else.
I'm using vs 1.5.1.
What also works is the following. If you have a page called Frequently Asked Questions and you have this page called in seo FAQ you can point to just FAQ.
In other words. Create an anchor called Anwer1. Create a link (not internal link) for example on Question1, use protocol <other> (not http://) and you just can use url: FAQ#Answer1.
You don't have to type all the url.
In other words. Create an anchor called Anwer1. Create a link (not internal link) for example on Question1, use protocol <other> (not http://) and you just can use url: FAQ#Answer1.
You don't have to type all the url.
Spot on.funt wrote:What also works is the following. If you have a page called Frequently Asked Questions and you have this page called in seo FAQ you can point to just FAQ.
In other words. Create an anchor called Anwer1. Create a link (not internal link) for example on Question1, use protocol <other> (not http://) and you just can use url: FAQ#Answer1.
You don't have to type all the url.
Who is online
Users browsing this forum: No registered users and 111 guests