Announcement

Collapse
No announcement yet.

Collapsable menu problems

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

    Collapsable menu problems

    Hi,

    I recently purchased Collapso, whilst very good for the money I have realised that it doesnt really do what I want. Collapso lists out all sections regardless. What I need to do is list them out conditionally.

    I have a horizontal level 1 navigation bar. If for example a user clicks on "air treatment" then I only wish to show particular sections relevent to air treatment.

    Hope that makes sense. I have had a good look at Norms menu and have been trying to modify it to do what I want but I am making little progress. If anyone knows of a more expensive/flexible plugin that is available then I would be most grateful.

    Thanks

    #2
    I don't think you need an addon, you can do this with standard actinic functions. Select a top level section and then show its sub and/or sub-sub sections, is that what you want to do? If so have a good read of Gabe's blockif tutorials in the layouts forum.

    Comment


      #3
      Collapso has a maximum depth but thats wont do what I need.

      Say I have 10 sections in total (each with subsections)
      I have a top level navigation with "products a" and "products b"

      I need to be able to display only the first 5 sections in products a, and the last five sections in products b.

      ie. not list out all sections on every page.

      Comment


        #4
        (leehack) I had a look at Gabe's excellent tutorials.

        I have had a pop at this and can list out main sections (selectively, by checking for a user defined variable) and list out the subsections. Great.
        But when I try to write the PHP to add styles to make them collapsable then things go wayward. This is down to my lack of expertise in PHP and Actinic hence the need for an add-on. I've been at it for a full 48hours now and am losing the plot!!!

        Comment


          #5
          Originally posted by greyhound View Post
          Say I have 10 sections in total (each with subsections)
          I have a top level navigation with "products a" and "products b"
          You could do this using blockif and a new variable to identify whether the section is in a or b

          search the forum for 'Idiots guide: Splitting your product list (TLS) into sections' for more information

          Malcolm

          SellerDeck Accredited Partner,
          SellerDeck 2016 Extensions, and
          Custom Packages

          Comment


            #6
            Personally i have always done one method or another, never dynamic menu and dynamic section choice of top level sections. I'd expect that Javscript is what you would need to use rather than php though. Can you show an example of a site that has things as you want it or is this a one off type affair?

            Comment


              #7
              [QUOTE=leehack;238341]Personally i have always done one method or another, never dynamic menu and dynamic section choice of top level sections. I'd expect that Javscript is what you would need to use rather than php though. Can you show an example of a site that has things as you want it or is this a one off type affair?

              Level 1 navigation to select level 2 navigation items. The only difference is that I would want the level 2 nav collapsable.

              Comment


                #8
                Your problem is that a standad off the shelf addon will not do this Ben as the addon needs to be controlled by variables set at section level. This would mean a complete rewrite of the addon (actually it'd be a new one pretty much) and thus you could expect a bill of £150-300 to do this for you. I have pondered this myself before but always done full collapso or like the example i showed you, never both. You can't get an addon and then get this to communicate with your own variables, it's a pain but not really solvable. Is there any scope to just do things as i have without the interaction (as thats free), or must it be dynamic?

                PS - can you remove the link to the domain off your post please, as only posted for 2 mins while you read, as it's a link to my test domain.

                Comment


                  #9
                  I need to collpasable element as the client has specified that it must be in there.

                  I find it absolutely crazy that this is such a faff. I really dont know what to do now

                  Comment


                    #10
                    You probably need an actinic expert in addons then Ben i'm afraid. Standard addons from Norman are cheap for the work involved in them, but they sell on mass of course. The only limitation is as you have found, they run on the complete catalog and only the depth and styles are really controllable. You will need an extra level of control, possibly a body id or alike. I've been up this corner myself, so know how frustrating it can be.

                    Have you found a Javascript expandable script and seen what it operates on, you may find it can be merged with something like i have done as you can set anything you like at section level and also know at which level that section sits at by just knowing it's level number.

                    Comment


                      #11
                      I have written some very simple javascript:

                      Code:
                      <script language="javascript">
                      function toggleMenu(objID) {
                      if (!document.getElementById) return;
                      	var ob = document.getElementById(objID).style;
                      	ob.display = (ob.display == 'block')?'none': 'block';
                      }
                      </script>
                      So far I have a block listing out the level 1 sections. My problem is looping through the child elements to apply the divs and styles.

                      In .net I would have written something akin to:

                      get number of level 1 sections
                      iterate through each level 1 item and check for children
                      if children exist then get count of children
                      iterate through children and add styling
                      when child iteration ends process next level 1 section and repeat the process

                      Cannot really see a way to replicate this type of functionality using php and the actinic variables though.

                      Comment


                        #12
                        No I've really done it - Actinic stuck in a while variable loop. Cannot even get it to open up again.

                        Comment


                          #13
                          Originally posted by leehack View Post
                          Have you found a Javascript expandable script and seen what it operates on, you may find it can be merged with something like i have done as you can set anything you like at section level and also know at which level that section sits at by just knowing it's level number.
                          Have either of you looked at freestyle menus from Angus Turnbull - http://www.twinhelix.com.
                          The code works with lists of the menu items and produces drop down menus. I haven't got round to coding it yet but my thinking was to use this javascript code with some custom variables and blockif's to work with actinic.

                          Malcolm

                          SellerDeck Accredited Partner,
                          SellerDeck 2016 Extensions, and
                          Custom Packages

                          Comment


                            #14
                            My NorList menu uses Angus's excellent freestyle menu code. I send him a payment for every copy used. My bit of the code (the Actinic integration PHP) is a lot less tricky than the Collapso stuff.
                            Norman - www.drillpine.biz
                            Edinburgh, U K / Bitez, Turkey

                            Comment


                              #15
                              I need a vertical collapsing menu. I also need to be able to use your Collapso menu but set a variable per section so that I can choose which layouts the section menu items appear in. The javascript and css aren't my difficulty, its using Actinic and PHP that is giving me the headache. If I were doing this in dotnet with datareaders and arrays it would have taken me 10minutes.

                              I gave up today - almost ready to give up on Actinic also. I opted to approach a company who will no doubt charge an arm and a leg to write me relevent PHP.

                              Comment

                              Working...
                              X