Announcement

Collapse
No announcement yet.

Display top level sections only in JS menu

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Display top level sections only in JS menu

    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.
    Attached Files

    #2
    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.
    Code:
    <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)
    {
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      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

      Comment


        #4
        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>
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment


          #5
          Its all working, Thanks

          Sam

          Comment


            #6
            combining Act_sections.js with Norman's Collapsing menu

            Hi,

            on my site 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
            Mathieu Perino
            ICTL - Liaisons Optiques
            Website: www.ictl.com

            Comment


              #7
              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.
              Code:
              <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
              <!--
              function YahooSections(ar)
              becomes
              Code:
              <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
              <!--
              function TopSections(ar)
              and call that routine instead of YahooSections.
              Norman - www.drillpine.biz
              Edinburgh, U K / Bitez, Turkey

              Comment


                #8
                Hi Norman,
                It solved the problem but now all the subsections appear in the center menu...
                Something I did wrong???
                Mathieu Perino
                ICTL - Liaisons Optiques
                Website: www.ictl.com

                Comment


                  #9
                  You need to modify this JavaScript to only show top-level sections. There are posts on the Forum about this.
                  Norman - www.drillpine.biz
                  Edinburgh, U K / Bitez, Turkey

                  Comment


                    #10
                    Hi,

                    I found my answer in another post indeed : I had to replace the fragment
                    Code:
                    document.write(YahooSections(section_tree))
                    in my center menu with
                    Code:
                    document.write(YahooSections(sections))
                    Cheers.
                    Mathieu Perino
                    ICTL - Liaisons Optiques
                    Website: www.ictl.com

                    Comment


                      #11
                      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?
                      http://www.phoenix-pcs.co.uk

                      Comment


                        #12
                        See http://community.actinic.com/showthread.php?t=14853
                        Norman - www.drillpine.biz
                        Edinburgh, U K / Bitez, Turkey

                        Comment


                          #13
                          Done and done, thanks Norman.
                          http://www.phoenix-pcs.co.uk

                          Comment


                            #14
                            New query, linked to this thread I think

                            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.
                            Last edited by Paul Bulpit; 25-Sep-2006, 12:51 PM. Reason: Spotted something
                            Paul
                            Flower-Stands.co.uk - the UK's largest online supplier of Fresh Flower Merchandising Stands

                            Using V10.2 with Norman's brilliantly simple TABBER.

                            Comment


                              #15
                              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
                              Code:
                              <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>
                              Norman - www.drillpine.biz
                              Edinburgh, U K / Bitez, Turkey

                              Comment

                              Working...
                              X