View Full Version : Display top level sections only in JS menu
sgreenway
04-Feb-2006, 02:27 PM
I want to change my YahooSections menu so that it only displays the main sections and not the subsections. I have found this post on doing that :
http://community.actinic.com/showthread.php?t=14853
It says replace
<!--@act NETQUOTEVAR:SECTIONTREE_RAW -->
with NETQUOTEVAR:TOPLEVELSECTIONS_RAW
The problem I have got is that I can't find
<!--@act NETQUOTEVAR:SECTIONTREE_RAW -->
I'm not sure if I'm looking in the wrong place for it. If anyone can point me in the right direction.
NormanRouxel
04-Feb-2006, 02:35 PM
If you're using a Theme that uses the YahooSections code (which seems likely) then it should be in Act_Primary.html about 18 lines down from the top. E.g.<SCRIPT LANGUAGE="JavaScript" SRC="actiniccore.js" TYPE="text/javascript"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript" SRC="actinicextras.js" TYPE="text/javascript"></SCRIPT>
<!--@act NETQUOTEVAR:SECTIONTREE_RAW -->
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
function YahooSections(ar)
{
sgreenway
04-Feb-2006, 03:04 PM
Thanks Norman
Found it, I was looking in Act_BrouchurePrimary and not Act_Primary. I've done the changes and its work. However the subsections are still being displayed in brouchure pages(home page). What do I need to change in Act_BrouchurePrimary to stop this? It doesn't contain the <!--@act NETQUOTEVAR:SECTIONTREE_RAW --> line.
Sam
NormanRouxel
04-Feb-2006, 04:09 PM
In Act_BrouchurePrimary look for the line
<SCRIPT LANGUAGE="JavaScript" SRC="Act_section_tree.js" TYPE="text/javascript"></SCRIPT>
and change it to.
<SCRIPT LANGUAGE="JavaScript" SRC="Act_sections.js" TYPE="text/javascript"></SCRIPT>
sgreenway
04-Feb-2006, 05:25 PM
Its all working, Thanks
Sam
matperino
13-Feb-2006, 03:23 PM
Hi,
on my site (http://csstest.ictl.com/) I have a collapsing menu on the left (from Norman) and I would like to have another menu in the center, showing only top sections.
Yet I have a problem : when I click on a section in the centre menu, the subsections appear in the left menu... (http://csstest.ictl.com/).
Any suggestion?
thanks
NormanRouxel
13-Feb-2006, 05:01 PM
Ahhh. I see now. When you emailed me earlier you didn't explain what the problem actually was. I took a quick look and assumed you were't happy with the single column layout.
The collapso menu uses a routine called YahooSections (this allows it to replace the existing Actinic one). You have to copy the modified top-level only YahooSections JavaScript into your Act_Primary but give the function a different name e.g.<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
function YahooSections(ar)becomes<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
function TopSections(ar)and call that routine instead of YahooSections.
matperino
14-Feb-2006, 03:27 PM
Hi Norman,
It solved the problem but now all the subsections appear in the center menu...
Something I did wrong??? :o
NormanRouxel
14-Feb-2006, 03:50 PM
You need to modify this JavaScript to only show top-level sections. There are posts on the Forum about this.
matperino
15-Feb-2006, 08:36 AM
Hi,
I found my answer in another post indeed : I had to replace the fragment document.write(YahooSections(section_tree)) in my center menu with document.write(YahooSections(sections))
Cheers.
GiganticDays
24-Feb-2006, 03:02 PM
I currently use the Smart template and would also like to show only the main sections in the left hand column, however, after trying the suggestions here, all of my left-hand side link vanish. I can only seem to get links two levels deep or none at all. Any ideas anyone?
NormanRouxel
24-Feb-2006, 03:20 PM
See http://community.actinic.com/showthread.php?t=14853
GiganticDays
24-Feb-2006, 03:27 PM
Done and done, thanks Norman.
Paul Bulpit
25-Sep-2006, 12:06 PM
Many months ago I used info from the forum to show only top level sections in my Smart Theme left panel, both on the Home Page & the Store Pages, but never got around to fixing the same issue at the Check-Out. I'm trying to fix this now, but the info. I find today does not ring any bells.
However, applying what I have learnt today, the above code does appear in Act_Primary & Act_Brochure.
My problem is that I have now applied the same change to Act_PrimaryCheckout but the menu is spaced apart by a line.
The website is at www.rainbowfloristsupplies.co.uk
This gives you the Home page, panel correct.
Enter the store, panel correct.
Find a product, panel correct.
Add a product to order, incorrect.
Checkout now, incorrect.
Looking forward to your help, it's bound to be simple!
Edit: looking at this thread, I see that the website linked in post #13 has the same problem.
NormanRouxel
25-Sep-2006, 03:02 PM
Paul,
You are not using the same YahooSections code in the Cart and Checkout template as in Act_Primary. Look in Design / Options / Layouts / Primary Templates and use this<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
function YahooSections(ar)
{
var strIDs = '';
for (var i=1;i<=ar.length;i++)
{
if (ar[i].sURL != null)
{
strIDs += '<a href="' + ar[i].sURL + '"><span class="actxxsmall"><b><font color="#3a3a3a">' + ar[i].sName + '</font></b></span></a><br>';
}
}
return strIDs
}
//-->
</SCRIPT>
Paul Bulpit
25-Sep-2006, 08:21 PM
Thank you Norman, you're a brick!
About time you took a holiday or retired.......
http://community.actinic.com/showthread.php?t=13037
Many many thanks.
NormanRouxel
25-Sep-2006, 10:45 PM
I am on holiday - in Bitez, Turkey for the next 4 weeks - luckily I now have broadband out here.
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.