Announcement

Collapse
No announcement yet.

Section Level Navigation

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

    Section Level Navigation

    Hi

    I'm using the following JavaScript to create the section level navigation but I have a few questions:

    <!--@act NETQUOTEVAR:TOPLEVELSECTIONS_RAW -->
    <SCRIPT LANGUAGE = JavaScript>
    <!--
    function BulletList(pItem)
    {
    var strIDs = '';
    {
    for (var i = 1; i <= pItem.length; i++)
    {
    strIDs += '<div class="LeftNavBackground"><div class="LeftNavContent"><a href=' + pItem[i].sURL + ' accesskey="" class="nav" title="'+ pItem[i].sName + '">'+ pItem[i].sName + '</a></div></div><div class="BlueBoxLine"></div>';
    }
    }
    strIDs += ''
    return strIDs
    }
    -->
    </SCRIPT>

    1) Can I easily order this alphabetically?

    2) Can I only show the section navigation when they have clicked on a department. For example I have 2 department Cards, Gifts and Gifts Wrap. When the customer click on the Cards department I only want them to see what is in that section.

    This Community Site has been really valuable and has been a great help to me.

    Regards

    Darren
    Darren Tickle
    http://www.funky-cards.co.uk

    Greetings cards, and gift wrap for every occasion.

    #2
    Hi There,

    1) Can I easily order this alphabetically?
    You will need to get in touch with Mole End they have a section sorting solution that will help you.

    2) Can I only show the section navigation when they have clicked on a department. For example I have 2 department Cards, Gifts and Gifts Wrap. When the customer click on the Cards department I only want them to see what is in that section.

    If you go to the Advanced User Guide page 34 "Creating a Drop-Down List Containing the Top-Level Sections and Sub Sections" this article will help you achieve what you want. I suggest you should think about using NETQUOTEVAR:CHILDSECTIONS_RAW rather than NETQUOTEVAR:TOPLEVELSECTIONS_RAW.

    Cheers,

    Bruce.
    Bruce King
    SellerDeck

    Comment


      #3
      Hi Bruce

      I'll try that out but I'm not sure what you mean by using NETQUOTEVAR:CHILDSECTIONS_RAW, where would I be using this as this isn't in the JavaScript. Or are you saying I can use this instead. If so how?

      I'll contact Mole Valley about the sorting too.

      Thanks

      Darren
      Darren Tickle
      http://www.funky-cards.co.uk

      Greetings cards, and gift wrap for every occasion.

      Comment


        #4
        Hi Bruce

        I have tried writing this code out as I don't want it to create a drip down list but I keep getting errors.

        The code that I have written is as follows:

        <!--@act NETQUOTEVAR:CHILDSECTIONS_RAW -->
        <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
        <!--
        /***********************************************************************
        *
        * ACT_DropListBox - returns a string containing the HTML for the SELECT listbox
        *
        ************************************************************************/
        function ACT_DropListBox(ar)
        {
        var strIDs = '';
        for (var i=1;i<=ar.length;i++)
        {
        if (ar[i].sURL !=null)
        {
        strIDs += '<div class="LeftNavBackground"><div class="LeftNavContent"><a href="' + ar[i].sURL + '" class="nav" title="' + ar[i].sName + '">' + ar[i].sName + '</a></div></div>'';
        {
        if (ar[i].pChild)
        {
        for (var j=1;j<=ar[i].pChild.length;j++)
        {
        Advanced Users Guide - 36
        strIDs += '<div class="LeftNavBackgroundList"><div class="LeftNavContentList"><a href="' + ar[i].pChild[j].sURL + '" class="nav" title="' + '- ' +
        ar[i].pChild[j].sName + '">' + '- ' +
        ar[i].pChild[j].sName + '</a>';
        {
        if (ar[i].pChild[j].pChild)
        {
        for (var k=1;k<=ar[i].pChild[j].pChild.length;k++)
        {
        strIDs += '<div class="LeftNavBackgroundList"><div class="LeftNavContentList"><a href="' + ar[i].pChild[j].pChild[k].sURL +
        '" class="nav" title="' + '- - ' + ar[i].pChild[j].pChild[k].sName + '">' + '- - ' + ar[i].pChild[j].pChild[k].sName + '</a>';
        }
        }
        }
        }
        }
        }
        }
        }
        strIDs+=''
        return strIDs
        }
        //-->
        </SCRIPT>

        Do you think that I need the second child?

        Cheers

        Darren
        Darren Tickle
        http://www.funky-cards.co.uk

        Greetings cards, and gift wrap for every occasion.

        Comment


          #5
          Hi Bruce

          I managed to get this to work but it doesn't give me the effect that I'm after, which is like this http://www.djwade.com/hsbc/cardsblank.html.

          What I'm getting with this code is something completely different. I have attached a snap shot of it for you too see.

          Let me know what you think I should do.

          Cheers

          Darren
          Attached Files
          Darren Tickle
          http://www.funky-cards.co.uk

          Greetings cards, and gift wrap for every occasion.

          Comment


            #6
            You have got a very specific requirement there, which it isn't really possible to do in Actinic.

            You firstly would need three different overall layout templates - one which showed the sections in the 'Greetings Cards' department, one which showed the sections in the 'Gifts' department, and one which showed the sections in the 'Gift Wrap' department.

            Then you need to be able to show the same list of sections when you are in the 'Greetings Cards' department - or any sub-sections within the 'Greetings Cards' department.

            I don't have the skills to show you how to do that without hard-coding the HTML for the links (i.e. not using Actinic's JavaScript section links).

            Another thing to try which would look different (but nice) is Norman Rouxel's NorMenu - see http://www.drillpine.biz/actinicstuff/

            A working demo (nicely customised) is at http://www.shopatdigital.co.uk/

            Comment


              #7
              Hi Chris

              Thanks for this information. I don't want to go down this route as this type of menu system isn't really very accessible, so I think I'm going to stick with what I have got and try and see if I can also add my access keys to my top level sections.

              It functions and doesn't look too bad. May be when I have some more time and know more about Actinic I might try and work out how to do this using JavaScript.

              Cheers

              Darren
              Darren Tickle
              http://www.funky-cards.co.uk

              Greetings cards, and gift wrap for every occasion.

              Comment

              Working...
              X