starchini Posted March 28, 2014 Share Posted March 28, 2014 Greetings, I am fairly new to templating with CubeCart and I have been experimenting these last few months, basically going through, trial by error (Its the best way I learn). I have come across an error I must have made and not initially noticed and now I cannot figure out where that error lies or how to fix it. Basically, in the site documents (t&c's, privacy etc) menu the homepage title keeps repeating (see picture) ' alt='' class='ipsImage' > I know where the problem stems from, as I remember last week trying to find a way to remove the 'homepage' title from the main menu. Anyhow, I'm hoping that the solution is an easy one and that I'm too much of a noob to notice. I thank you all in advance for any help. Cheers, Christian. ' alt='' class='ipsImage' > Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 28, 2014 Share Posted March 28, 2014 Hello starchini! We will compare the storefront Navigation with the Documents list. Please look at the template files box.navigation.php and element.navigation_tree.php. The box file should have no looping code. Just a <ul> with <li> tags for Homepage, Gift Certs, and Sale Items. There will also be the {$placeholder} for the actual categories tree, {$NAVIGATION_TREE}. The element file should also not contain a loop as the core code will call this little snippet of HTML for each category and sub-category to be listed, concatenating each to the end of the previous. Compare with the file box.documents.php. This template loops through an array of all enabled documents. If you have added a <li> tag for the Homepage (which does not actually get included in the documents array) inside this loop, that would explain why it shows for every iteration of the {foreach} loop. Quote Link to comment Share on other sites More sharing options...
starchini Posted March 29, 2014 Author Share Posted March 29, 2014 Brilliant, that has sorted, thank you bsmither! On a side note, you wouldn't happen to know what code I need to look at to remove the 'homepage' title from the main left navigation? Thanks in advance for your response. Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 29, 2014 Share Posted March 29, 2014 Please look at the template file box.navigation.php. The box file should have no looping code. Just a <ul> with <li> tags for Homepage, Gift Certs, and Sale Items. You may remove (or <!-- Comment -->) the <li><a> homepage </a></li> statement. Quote Link to comment Share on other sites More sharing options...
starchini Posted April 4, 2014 Author Share Posted April 4, 2014 Thank you for this. I was commenting that line out, but because of the cache it wasn't updating the site straight away, leading me to believe that I was doing something wrong. Cheers. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.