We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14883 ☆ A M B ☆
    • 450 Posts
    I need a strategy to maintain some large/complex dropdown menus, and my initial thought is to create a resource for each main panel of the dropdown. I’d create a custom template, which would not have a full HTML structure but rather just a <div> as the root node. Probably some custom TVs as well for keywords and things. Basically, I’d be using these resources as glorified chunks - they’d never be accessed directly by an HTTP request, but only via an API call from a snippet.

    Is this possible to do? Is it wise to do? Is there a better strategy I should embrace here?
      • 3749
      • 24,544 Posts
      Assuming that Wayfinder definitely won’t do the job (and I have yet to find a menu that Wayfinder won’t create), you could definitely do it, but I think you might be better off using chunks and setting their properties (or using custom property sets with them) rather than resources. It will be much faster and will carry a lot less overhead. Unless you need a lot of exotic TV types (e.g., rich text, date, image, etc.).
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 14883 ☆ A M B ☆
        • 450 Posts
        This actually isn’t a traditional "menu" so much as large drop-down content blocks that may include blocks of text and other types of content in addition to list-type menus. Otherwise I’d definitely use Wayfinder.

        I do feel like I’d benefit from having a WYSIWYG editor for these, and some of the benefits of applying a template & TVs. But... I definitely don’t want to do anything that is extremely slow or resource-taxing. Hmm. Maybe I’ll just have to use chunks after all.
          • 3749
          • 24,544 Posts
          Quote from: jrotering at Dec 08, 2010, 04:18 PM

          This actually isn’t a traditional "menu" so much as large drop-down content blocks that may include blocks of text and other types of content in addition to list-type menus. Otherwise I’d definitely use Wayfinder.

          I do feel like I’d benefit from having a WYSIWYG editor for these, and some of the benefits of applying a template & TVs. But... I definitely don’t want to do anything that is extremely slow or resource-taxing. Hmm. Maybe I’ll just have to use chunks after all.

          FWIW, I don’t use WYSIWYG editing for anything any more. I usually don’t even install TinyMCE except for clients. It slows everything down, mungs up my code, and virtually all styling and layout is done in my CSS files. The only time I miss it is when I have to create a long list or insert a bunch of images.
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 14883 ☆ A M B ☆
            • 450 Posts
            Quote from: BobRay at Dec 08, 2010, 04:27 PM

            FWIW, I don’t use WYSIWYG editing for anything any more. I usually don’t even install TinyMCE except for clients. It slows everything down, mungs up my code, and virtually all styling and layout is done in my CSS files. The only time I miss it is when I have to create a long list or insert a bunch of images.

            I usually avoid them as well... but in this case I won’t be the only one editing the resources.
              • 3749
              • 24,544 Posts
              In that case, you may want to go with a resource but put as much of the content as you can into TVs. That will cut the odds of a user making a mess out of the page.

              You can use getResources (or a custom snippet) to pull in everything for the front-end page.
                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting