Jump to content

Change "Homepage" link and add new Link button to menu


vidmarc
 Share

Recommended Posts

In the skin template main.php, find this group of statements (or similar):

<div id="breadcrumb">
  <ul>
    <li><a href="{$STORE_URL}">{$LANG.common.home}</a></li>
{foreach from=$CRUMBS item=crumb}
    <li><a href="{$crumb.url}">{$crumb.title}</a></li>
{/foreach}
  </ul>
</div>

After the opening <ul>, add a <li> that contains the absolute link to your front end.

 

You can change {$LANG.common.home} to a static bit of text, or you can use CubeCart's language editor. In admin, Languages, click the edit icon of the language you want to edit. On the drop-down selector, choose "Common". Change the phrase for 'home'.

Link to comment
Share on other sites

If you are changing a stock skin, then, yes. However, if you copy the stock skin to a custom name, update the config.xml file with the new name, and have CubeCart use that new skin, then an upgrade will not overwrite that. It will be up to you, therefore, to make any changes an upgrade made to stock skins to get applied to your new skin.

 

If you are really good with jQuery, you can create a javascript file and put it in the skin's /js/ folder (no need to edit the existing script.js file). This file will have jQuery search for (div.breadcrumb) and the child li tags. The script then adds a new li tag at the front of the resultant array. jQuery then writes the array back to the document.

 

With the code of CubeCart, finding a hook to use, plus catching a template, immediately from reading the file in or after it is rendered to the final HTML, is ridiculously difficult.

Link to comment
Share on other sites

Sorry, I actually did not look at your store. I just assumed because you didn't mention you were using Blueprint, I gave instruction on Kurouto.

 

The Blueprint template file you want is box.navigation.php.

 

If you plan to do the jQuery trick, instead of (div.breadcrumb), you will use (div.box-navgation) [sic].

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.

Guest
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.

 Share

×
×
  • Create New...