We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24981
    • 109 Posts
    Hi,

    I am offering a bounty/payment for development (or modification) of a menu snippet.? The requirements are set out below.? The timeframe is 2 weeks.? The licence must by GPL and the price is US$250. Its not a huge amount but you still get the reward of contributing to the community! I have posted a request for this here and in the Etomite forums previously - but need to move ahead to start the templates I need.

    The key difference to the menu Snippet, is that it is neither pinned to a particular docID as a starting point, nor to the current document, but to how many levels deep the document is in the hierarchy.? In this way it works similar to menu tags in some other CMS eg. cmsimple.dk, and "splitmenus" module for Mambo.

    Kind Regards

    Richard
    __________________________

    I have tried various different configurations of the ListMenu to get the following to work. What I am trying to achieve is a design with multple different menu blocks (all using <LI> style menus), where each block can be configured to show just the pages at that particular level, and will display if you are in any page on that level OR in a direct parent page (at the level above) OR in any child, or grand-child page.

    The easiest way to explain is to look at an example at http://www.createloyalty.com.au
    * If you click on Rewards the Level 2 Menu appears
    * If you click on Customer Rewards the Level 3 menus appear
    [Note: This example does not trace the path back to root by retaining the onMenu status for parents. What I would like that is not in the example, is that when Customer Scheme A (Level 3) is active, both Customer Rewards, and Rewards retain "onMenu" class or id]

    Can anyone modify ListMenu (or write a new Snippet) to achieve this?

    Detailed explanation below.
    _______________
    1. Block 1 - only displays Level 1 menus eg. Home, Create Txt, Rewards etc.
    * If you in any page on Level 1 - all Level 1 pages show, and the page that you are on has a "menuOn" class or id.
    * If you are on a Level 2 page, then all Level 1 menus continue to show, and your parent Level 1 retains a "menuOn" class or id.
    * If you are on a Level 3 page, then all Level 1 menus continue to show, and your grand-parent Level 1 retains a "menuOn" class or id.
    _______________
    2. Block 2 - only displays Level 2 menus eg. If you click on Rewards in Level 1, you can see Customer Rewards, Trade Rewards etc in this block (Level 2)
    * If there are no children to a Level 1 item then this block does not display. (click on Home to see)
    * If you are on a Level 2 page then all Level 2 pages show, and the page that you are on has a "menuOn" class or id.
    * If you are on a Level 3 page, then all Level 2 menus continue to show, and your parent Level 2 retains a "menuOn" class or id.
    _______________
    3. Block 3 - Level 3 menus - eg. If you click on Customer Rewards in Level 2, you can see Customer Scheme A, Customer Scheme B etc in this block (Level 3)
    * If there are no children to a Level 1 item then this block does not display. (click on Home to see)
    * If there are no children to a Level 2 item then this block does not display. (click on Trade Rewards)
    * When you click on a Level 3 item (eg. Rewards>Customer Rewards>Customer Scheme A) then all Level 3? pages show and the page that you are on has a "menuOn" class or id.
    ________________
    Note: In CMSimple you can set the template call (like a snippet parameter) with a very easy: CODE<?php echo toc(1);?> for Level 1, or CODE<?php echo toc(2);?> for a Level 2. You can also combine the blocks to show a nested list so that CODE<?php echo toc(2,3);?> shows Level2 and 3 in a nested list.
    * I would also like any Block to be configurable so that further children/grandchildren etc are displayed in a nested list. I anticipate that such blocks would be css-styled as vertical lists.?
    _________________
    I envisage 2 parameters that can be set in the Snippet tag:
    * level - where the menu should start (by default level 1)
    * depth - the number of nested lists to show (by default 1, and 0=infinite)
    So, some example calls would be:
    [[SplitMenu?level=1]] - would display Level 1 list (same as www.createloyalty.com.au Level 1)
    [[SplitMenu?level=2,depth=1]] - would display Level 2 list only because depth=1 is same as default
    [[SplitMenu?level=3,depth=2]] - would display Level 3 and 4? in a nested list
    [[SplitMenu?level=3,depth=4]] - would display Level 3,4,5,6? in nested lists
    [[SplitMenu?level=3,depth=0]] - would display Level 3 and deeper (perpetual) in nested lists
    * There can be other parameters set in the Snippet.? ListMenu has some great settings eg. $removeNewLines, $currentAsLink, $sortWiz.? ListMenu also allow for CSS styling in nested lists depending on the level.
    ie. // STYLES used
    // #LM_level_N? ? ? menu level where N is the number of the depth
    //? ? ? ? ? ? ? ? ? starting at 0
    // #LM_youAreHere? ?menu item of current location
    // .LM_expanded? ? ?expanded menu item with children
    // .LM_collapsed? ? menu item with childen, but not expanded
    // .LM_endPage? ? ? menu item with children
    // .LM_description? menu item description
    It would make sense to include similar CSS styles and parameters in this Snippet.

    I am happy to discuss any of the above on iChat or other IM, or email.? Please post here if you are interested.? You can also PM me.
    ________________

    Regards

    Richard

      • 7455
      • 2,204 Posts
      Hve you contacted Jared? he made the list menu snipped and lots of other snippets and help me alot with some menu snippet works
        follow me on twitter: @dimmy01
      • This should be relatively simple, simply for no other reason that I’ve created about a dozen list-built menu systems with various combinations of what you’re asking for. I can knock this out in a day or two for you.

        What I’ll need to know is EXACTLY how you want the XHTML to be rendered, and a little more explanation of how the menu system functions. Off the top of my head, it looks like it will be two seperate menu builder snippets. One for the two level nested list top menu and one for the 3rd level.

        Does this sound right?
          Ryan Thrash, MODX Co-Founder
          Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
          • 4018
          • 1,131 Posts
          I agree, Ryan. I’ve managed to work on a similar snippet. Mine basically creates a two-level menu using embedded list menus and adds the CSS classes on the fly to generated highlighted menu items. Like you said, should be easy enough to create a second snippet for menus that are third level or higher.
            Jeff Whitfield

            "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
          • Jeff... tag! You’re it! Go with it man. smiley
              Ryan Thrash, MODX Co-Founder
              Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
              • 24981
              • 109 Posts
              Great guys. Nothing like cash for inspiration smiley

              Jeff - can we discuss by email or iChat. My iChat name is ricardosanx. Email is richard@ the web address in my signature.

              If possible I’d prefer to have it as a single snippet - that can be use 2 or 3 times on the same page, with different parameters.

              In the createloaylty.com.au example: there would be 3 snippets:
              [[SplitMenu?level=1,depth=1]]
              [[SplitMenu?level=2,depth=1]]
              [[SplitMenu?level=3,depth=1]]

              but there would be many other ways to configure.

              Example: level 1 is horizontal, level 2 and 3 are vertical nested. Here is an example
              [[SplitMenu?level=1,depth=1]]
              [[SplitMenu?level=2,depth=2]]

              Example: level 1 and 2 are vertical nested, level 3 is horizontal.
              [[SplitMenu?level=1,depth=2]]
              [[SplitMenu?level=3,depth=1]]

              Or I will use in combination with one of the JSscript menus. So Level 1 (and dropdowns) would use a Jscript Snippet, but on the left I would have a nested Level 2 and 3. Like this, which I’ve done in Mambo split menus http://www.tech2grow.com/eclaims/index.php?option=com_content&task=blogsection&id=4&Itemid=29
              Left block would be [[SplitMenu?level=2,depth=2]]

              Its midnight here, so I’m off, but can talk again tmrw.

              Regards

              Richard
              • This is similar to how I manage the menus (using TV’s as well) with the recursive ListMenuX snippet. Have you tried this? I used it to create the simple submenus at http://nitronadvisors.com/ and at http://circleofexperts.com/ as well as many others. Now, it does use the current doc id (or one specified as a parameter) to find it’s location, but you can use the depth recursion and TV’s to manage this appropriately in the pages using it.

                Perhaps I’m missing the point of what you are looking for, but I think this would meet your requirements, or could with some simple changes, be they dropdowns, flyouts, or static menus. All with customizable style classes, optional container divs with ids and/or classes, and more...

                Here’s my original posting of the snippet for reference:
                http://vertexworks.com/forums/index.php?topic=361.msg1925#msg1925

                Cheers...
                  • 24981
                  • 109 Posts
                  Hi Jason,

                  Thanks for that.  I have had a look at ListMenuX.  Yes I think my main issue with all the menu Snippets I have tried is that they all either work from the current page, or a fixed docID.  I think with a bit of playing around I can get it to work (as you say in conjunction with TVs).  But my proposed Snippet is much simpler to configure.  There is just one template, with the 3 different Snippet calls (the params are the same whatever page you are on, and no TVs required).

                  I’m craving that simplicity because I’ve used it before in cmsimple.dk (cms) - and it works for me for 95% of sites I design.  Looking at the API (and I’m not a programmer) there doesn’t seem to be an easy way to work out what level  the current page is on, in the site.  Is that correct? 

                  Are you are interested in helping me find "menu nirvana" smiley  I’m not sure who I should follow up with now between you, Ryan and Jeff....  If everyone is on the core team, I’m happy to make a donation to the "project" instead....

                  Cheers

                  Richard




                  • Thanks Richard... we’ll get back to you on that. Still some infrastructure level stuff to put in place. wink
                      Ryan Thrash, MODX Co-Founder
                      Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me