Jump to content

Page anchors


Recommended Posts

Hi I'm using CC6 with Mican.

When navigating my development site and other live CC sites, I notice that on each page transition it defaults to the top of the next page, which is invariably a header.  This results in the user automatically and continually having to scroll down before they can get to where the action is!

Is there a simple way in which an anchor can be inserted somewhere lower down (probably beneath the header) which would negate this? I guess the home page would need to be an exception otherwise it'd be pointless having a header!  It's not a show stopper but I find that I'm automatically scrolling down immediately before each new page loads.

Just a  thought.

As an aside I've had very positive results with the Inc tax, ex tax plugin -  so credit where it's due there.

Link to comment
Share on other sites

I can see where there is difficulty when viewing Mican on one of those stupid little "notebook" units (1280x600 video). More than half the screen is header stuff.

There is a conversation that discusses not showing a choice of language, nor a choice of currency, if that's good with you. Then, the logo was able to fit between the Search and Session/Basket boxes. Also, we then moved the Session/Basket and Search boxes above the Best Sellers box, and redesigned the logo to be thinner.

However, a solution that has not been fully tested is to do this:

In /classes/seo.class.php, near line 45, find:

private $_extension   = '.html';

Change to:

private $_extension   = '.html#test';

In the skin template main.php, near line 54, find:

<div id="main_body">

Change to:

<a name="test"></a><div id="main_body">

Clear CubeCart's cache as the Shop by Category links will not have the new URLs.

Another solution would be to have some javascript slide the page to the anchor after loading.

Edited by bsmither
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...