Jump to content

Custom Navigation Help


Recommended Posts

Apologies if this question is quite general, but I'm still new to Cube Cart. I'm trying implement a custom nav mega menu into my new store site, I've finished most of the CSS/JS stuff, but I'm not quite sure about what syntax I need to use now to link it all  together with Cube Carts categories. I've put the menu up on this domain to test it - http://101share.co.uk/ - at the moment it's just HTML to give an idea of what it might look like and not hooked up to the CC categories. It would be amazing if anyone could help me out here, I'm a bit confused about how to integrate it correctly or if I'll just need to write something me self to do so.

 

Thanks in advance

Link to comment
Share on other sites

Let's start by examining two template files of a stock skin: box.navigation.php and element.navigation_tree.php.

 

With these two files together, within a div, we start with:

UL followed by any LI we need as static. At the end, there will be more LI we need as static, followed by the closing UL.

 

But in place a dynamic LI, we call the element file which provides for a LI and if necessary, a nested sublist (UL-LI) that can be called recursively and repetitively.

 

Examining the HTML I see (not running the javascript), I have to ask:

<li class="menu-cat-title"><a href="#">Main Category</a></li>
<li><a href="#">Sub Category</a></li>
<li><a href="#">Sub Category</a></li>
<li><a href="#">Sub Category</a></li>
<li><a href="#">Sub Category</a></li>
<li><a href="#">Sub Category</a></li>

It appears your logic has the Main Category - the first list item - at the same hierarchy as the Sub-Categories - the rest of the list items.


I'll have more when I study your hierarchy more deeply.

Link to comment
Share on other sites

Thanks for the reply. I'm not worried about the structure of my HTML for now, I can change that later. I should have made my question more clear perhaps. Basically I want to know how to call the URL for each category so that I can replace my current static html urls with dynamic links that update when changes to the categories are made. I just can't find documentation on how to do that. So if I use <ul><li><a href="{$BRANCH.url}" title="{$BRANCH.name}" ><b>{$BRANCH.name}</b></a></li></ul> then it renders my first category, I want to know how to grab the other categories as well.

 

As an example of what I want, I'd like my menu to be structured similar to these: - http://www.petscave.com/http://www.rush-it-uk.com/index.php  .

 

Sorry for my ignorance, let me know if that doesn't make sense, because I may well be phrasing my question badly.  

Link to comment
Share on other sites

Thanks for the reply. I'm not worried about the structure of my HTML for now, I can change that later. I should have made my question more clear perhaps. Basically I want to know how to call the URL for each category so that I can replace my current static html urls with dynamic links that update when changes to the categories are made. I just can't find documentation on how to do that. So if I use <ul><li><a href="{$BRANCH.url}" title="{$BRANCH.name}" ><b>{$BRANCH.name}</b></a></li></ul> then it renders my first category, I want to know how to grab the other categories as well.

 

As an example of what I want, I'd like my menu to be structured similar to these: - http://www.petscave.com/http://www.rush-it-uk.com/index.php  .

 

Sorry for my ignorance, let me know if that doesn't make sense, because I may well be phrasing my question badly.  

Hi,

Both reference websites are using our CubeCart 5 mega dropdown menu mod 

 

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.

×
×
  • Create New...