| | | | | |
Can I stop the group/section title repeating itself on the drop-down navigation menu?
The drop-down navigation menu repeats the primary navigation option on the drop-down portion of the navigation menu as displayed below (notice the primary menu option 'News' is repeated):

If required you can hide the first menu item from each menu to produce this effect (notice the 'News' option isn't repeated).

Here's how to hide the 1st option from all the drop-down navigation menus:
- Add an ARTICLE component to your layout.
- Edit the settings for this new ARTICLE component - select the "HTML (advanced)" option and paste the following code into the text box:
<script type="text/javascript"> try{ (function(){ var tr, chk; for(var n=1; n < 30; n+=2) { if((chk = document.getElementById('bm_' + n)) != undefined) { var chkName = chk.getElementsByTagName('div')[0].innerHTML.toLowerCase(); if(chkName == 'my area') continue; if(chkName == 'shop' && chk.getElementsByTagName('td')[3].getElementsByTagName('td').length) continue; } if((tr = document.getElementById('bm_' + n + '_1')) != undefined) tr.style.display = 'none'; if((tr = document.getElementById('bm_' + n + '_2')) != undefined) { var cn = tr.getElementsByTagName('td')[(n == 1 ? 1 : 0)].className; if(cn.indexOf('t_separator_horizontal') != -1) tr.style.display = 'none'; if(chk.getElementsByTagName('tr').length < (n == 1 ? 2 : 3)) chk.removeChild(chk.getElementsByTagName('div')[1]); } } })() }catch(e){} </script>
- Click OK, save the modified layout and you should be good to go!
Note: You'll need to REPEAT this process for all your layouts to make them display consistently. Tip: Changing var n=1 to var n=3 (near the top of the code) will cause the home menu to remain unaffected. |
Justin Ruffell-Ward, 02/09/2009 |
|
| | | Alex | 21/07/2010 23:49 | Thanks for this. If I simply paste the code above in the HTML advanced box, then preview it has removed all of my home page content. If I paste in with the existing text in, it shows the following text INSTEAD OF my actual content:
Welcome Welcome to your trial site. This text and the uploaded image can be changed through the article found in the 'Welcome' group of the Web Office. To enter the Web Office, login and then select the Web Office link.
Any clues as to why that is? (I haven't dared save it in case I couldn't reverse it to what it should be!)
| | | | Insight Support | 22/07/2010 15:04 | Not quite sure what's happening in your case but I've just tested it and if you paste the code into the HTMl advanced option on an article component and place that component below your drop-down menu inside the header of your layout (the yellow area at the top) then it works.
If you still can't get it to work I suggest you create a duplicate of your homepage layout and add what you've done to the duplicate layout, save the changes and then email us and we'll take a look.
|
|
|
|
|
|