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

    I’m new to Modx & Wayfinder, so far I’ve been able to do everything I’ve needed, but after hours or research I’ve hit a snag so I thought i’d post on here to see if I can get some much needed and appreciated help. Basically, my site uses a mega-drop down, similar to the one here: http://www.sohtanaka.com/web-design/examples/mega-dropdowns/#
    One of my drop downs menus uses wayfinder to list everything in the ’products’ folder/container I have set up, this works fine, but I would like to be able to break the nav up into multiple <ul>’s so my 20 products are broken up into 4 columns listed next to each other, I’m sure this is easy enough but I just can’t seem to work it out.
    The other question I have, is that on the main product listing page I would like to have a list of all products and a small thumbnail and short description of each product. Is there anyway to generate automatically?

    Thank you for taking the time to read this!

    Greg.
      • 26931
      • 2,314 Posts
        • 10760
        • 14 Posts
        Quote from: sharkbait at Jan 03, 2011, 12:25 AM

        Hi Greg,

        this one? http://modxcms.com/forums/index.php/topic,50255.msg292734.html#msg292734

        Hey Sharkbait, thanks for the reply. That post looks like it may have what I need, I’ll let you know if I get stuck.

        Cheers,
        Greg.
          • 10760
          • 14 Posts

          Basically I want one <ul></ul> inside the drop down menu to be broken up into multiple columns like this:



          rather than this:


            • 24150
            • 4 Posts
            That is what I have been stuck on as well. Rather than post twice my progress you can see what I have done so far at the bottom of the page. http://modxcms.com/forums/index.php/topic,50255.msg292734.html#msg292734

            If I figure it out I’ll post the entire solution for revo mega menus here.
              • 24150
              • 4 Posts
              I got this to work with the following hack. I’m sure there is a more elegant way but that’s all I could figure our ATM.

              Using the [[*description]] tags on the pages that the <li> links from i made a class I could style in css.

              rowTpl chunk

              <li><a href="[[+wf.link]]" class="[[+wf.description]]" title="[[+wf.title]]">[[+wf.linktext]]</a></li>
              


              and styling those classes with css I was able to get it working. The styles have to be applied with the position:absolute attribute to get the columns lining up. I’m sure its a relative mashup and could be done cleaner but it works for now.
                • 33997
                • 150 Posts
                Do you care in what order the products show up? Meaning, can the columns go:
                Product1 | Product2 | Product3
                Product4 | Product5 | Product6
                just as easily as they can go:
                Product1 | Product3 | Product5
                Product2 | Product4 | Product6?

                If this doesn’t make a difference, you can style your li’s correctly, and apply display:block, a specific width, and floats to accomplish your goal. Take the below code and save as a .html and view in your browser to get an idea of what I mean.
                <html>
                <head>
                <style type="text/css">
                div.megamenu {
                	margin: 0;
                	width: 300px;
                	border: 1px solid black;
                	padding: 10px;
                }
                ul {
                	margin: 0;
                	padding: 0;
                	list-style-type: none;
                }
                li {
                	display: block;
                	width: 60px;
                	float: left;
                	padding: 5px;
                	margin: 8px;
                	color: white;
                	background-color: black;
                }
                div.clear {
                	clear: left;
                }
                </style>
                </head>
                <body>
                <div class="megamenu">
                <ul>
                <li>Product1</li>
                <li>Product2</li>
                <li>Product3</li>
                <li>Product4</li>
                <li>Product5</li>
                <li>Product6</li>
                <li>Product7</li>
                <li>Product8</li>
                <li>Product9</li>
                </ul>
                <div class="clear"></div>
                </div>
                </body
                </html>
                


                Hope that helps!

                By the way, if you use this, beware the IE 3px jog. I always calculate into my numbers to leave 6px extra in the design for each floated element. There are other ways to get around this I’m sure, I usually don’t need to get fancy. Usually I’m using floats for columns, and I’ll float one left and one right with 20-50px unused space between.
                  "Great spirits have always encountered violent opposition from mediocre minds." -Albert Einstein
                  • 33997
                  • 150 Posts
                  Quote from: gh85 at Jan 02, 2011, 11:08 PM

                  The other question I have, is that on the main product listing page I would like to have a list of all products and a small thumbnail and short description of each product. Is there anyway to generate automatically?

                  Ditto is your friend. Use custom templates to call up whatever info you want from your documents, place the ditto call on the main product listing page, and there you have it. The thumbnail you may have to upload manually, unless you want to start messing with phpThumb or if someone else can give you a better idea, but basically, you add a TV to your product template and have Ditto use that for the thumbnail.
                  Package: http://modxcms.com/extras/package/?package=96 (should be installed with Evo1.0.5; not sure about Revo)
                  Support Site: http://ditto.modxcms.com/
                  Wiki: http://wiki.modxcms.com/index.php/Ditto
                    "Great spirits have always encountered violent opposition from mediocre minds." -Albert Einstein
                    • 36549
                    • 572 Posts
                    Hi,

                    Does anyone know how to get a menu to display like this:

                    Product1 | Product3 | Product5
                    Product2 | Product4 | Product6

                    Thanks for any help.

                    J
                      www.9thwave.co.uk
                         WEB | DESIGN | PRINT
                      • 33997
                      • 150 Posts
                      At first glance, that seems very difficult to achieve. If you know all of your items in the first place, not so hard, as you can wrap each column in a div and apply the float to that div. Also, if each set of products will be in one container or something similar, you can tell WF to wrap the container in a div and float the divs. But to have each product displayed as such? I can’t think of any way to do that right now, short of applying different classes to each product, which may bulk up your CSS very quickly. That would make it doable though, I think.

                      product 1 class="menu1" | product 3 class="menu3" | product 5 class="menu5"
                      product 2 class="menu2" | product 4 class="menu4" | product 6 class="menu6"
                      
                      .menu1, .menu2 {
                      width: 100px;
                      float: left;
                      }
                      
                      .menu3, .menu4 {
                      width: 100px;
                      }
                      .menu5, .menu6 {
                      width: 100px;
                      float: right;
                      }
                      

                      That is untested, but it should be a decent starting point. The issue is that when you move to 9 items, as such:
                      product 1 | product 4 | product 7
                      product 2 | product 5 | product 8
                      product 3 | product 6 | product 9
                      you will have to change all your css, as now menu3 is in a new column, and menu5 and menu6 are also in new columns. And so on, EVERY TIME your menu changes....
                        "Great spirits have always encountered violent opposition from mediocre minds." -Albert Einstein