Subscribe: RSS
  • Hi,

    You can try this solution
    • custom snippet solution is obvious but not elegant

      Does anybody know why it was working on 1.0.4 and doesn't on 1.0.5?
        Как русифировать Modx 0.9.6.1(QuickEdit, TinyMCE)
        QuickEdit под win-1251 без mb_-функций
      • Shouldn't have been working on 1.0.4 :p

        It's been this way for as long as I can remember.
          Hi there! I am Mark Hamstra, I am the owner and developer of modmore.com, a MODX and community focused business. I've released a fair number of Extras.
          Tweet me @mark_hamstra, catch my infrequent blog at markhamstra.com and talk code at Github.
        • There's an explanation of how/why it works this way here http://sottwell.com/how-snippets-work.html
          Because of the way documents are processed in the Evolution parser, particularly the strict order in which elements are evaluated, this cached/uncached distinction has a second benefit. If a snippet has another snippet as the value of any of its parameters (more about snippet parameters later), it will fail. The main, outer snippet is detected and immediately sent to the eval() function, complete with its parameter value still set to snippet tags. The PHP eval() function has no idea what that is, and tries to use the inner snippet tags as the actual value of that parameter, which is meaningless to the snippet code. What the snippet code needs is the value of that inner snippet. So the question is, how to tell the MODx parser to evaluate the inner snippet and insert its value into the outer snippet's parameter before evaluating the outer, main snippet? The trick is to call the outer snippet uncached, and the inner snippet cached. Now, the outer snippet just gets its tags converted, but it isn't evaluated at this time. The inner snippet is processed next, and its output inserted in place. On the next pass through the parser, the outer snippet is finally processed, but now its parameter value is something it can use. This is a rather awkward hack and sometimes doesn't work as expected, but it's usually better than the alternative of using wrapper snippets with lots of runSnippet() function calls. Of course, MODx 2.0 Revolution handles snippet processing differently and this problem doesn't even appear in the first place.
          • I just upgraded and it broke my sidebar menus, Main menu is fine.

            Maybe I should not have done this... I wanted images and not text for my links in a couple sidebar menus - so i put an image tag into the manager's "menu title" box instead of text and it worked...
            until I upgraded Wayfinder. The new wayfinder (and this maybe a good thing I suppose) took the <, > and " (and maybe others) and converted them to their entities such as &lt; and this of course printed out my image tag code and did not display the image.

            Quick fix - I took the code produced, dropped it into BBEdit, converted the entities back to text, and replaced 2 wayfinder calls with hard coded ul lists. And so it may remain!

            Another note - I also tried the uninstall/restore and uninstall/preserve features and neither took me back to my older version of wayfinder, maybe I'm missing something on how to do it. Sure would be nice to have a working easy way to undo something like this.

            Bill

            Revo 2.07 Wayfinder 2.1.3
            • Couldn't you just put the image path in the menu title field, and in the rowItemTpl have the img tags using the placeholder to insert the image path?

              Actually, unless these side menus are multi-level, I wouldn't use Wayfinder for them at all. I would use Ditto (for Evo) or getResources for Revo, and use image-type TVs for the images.

              Or use Wayfinder, but use a block of CSS in the template head and use TVs to specify the background image for the top-level links if it's a multi-level menu. That way you would improve accessibility for the menu as well. Use a large text-indent value in the CSS to move the text off the screen for the links; the text is still available for screen readers and other browsers that don't use CSS, but for 99.9% of your visitors the link will just show the image.
              • They are multi-level menus.

                I was thinking about background images - I will try the background image in a TV and I like the improvement in accessibility - thanks for the ideas
                • FYI

                  With revo 2.08 and wayfinder 2.3 the broken menus I mentioned above are now 'unbroken'