X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Making anchor tags (internal page linking) work with Clean URLs? (https://forum.x-cart.com/showthread.php?t=54066)

TheWrongGrape 06-06-2010 03:46 PM

Making anchor tags (internal page linking) work with Clean URLs?
 
Hey all,

A problem I've just encountered is that anchor tags aren't working correctly and I think this is related to using clean urls.

For example, when viewing a product, I want to have a link that says "Jump to Reviews" above the fold which would link like this <a href="#reviews">Jump to Reviews</a> And right near the beginning of my reviews section down the page is <a name="reviews></a>Customer Reviews ...

With clean urls, instead of the link being interpreted as http://www.mydomain.com/current-page.html#reviews it's http://www.mydomain.com/#reviews. Also, if I go ahead and hard code it as <a href="{$http_location}/{$product.clean_url}.html#reviews> the page refreshes then jumps down instead of jumping down directly.

Any ideas of a workaround?

cflsystems 06-07-2010 07:16 PM

Re: Making anchor tags (internal page linking) work with Clean URLs?
 
Use <a href="current-page.html#reviews">. For product page for example use it like this

<a href="product.php?productid={$product.productid}#r eviews">Reviews</a>

TheWrongGrape 06-07-2010 10:14 PM

Re: Making anchor tags (internal page linking) work with Clean URLs?
 
That worked perfectly. Thank you so much!

ARW VISIONS 08-31-2011 03:01 PM

Re: Making anchor tags (internal page linking) work with Clean URLs?
 
what about a category page?

cflsystems 08-31-2011 06:01 PM

Re: Making anchor tags (internal page linking) work with Clean URLs?
 
<a href="home.php?cat={$cat}#reviews">Reviews</a>


All times are GMT -8. The time now is 04:16 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.