We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10226
    • 412 Posts
    return true;


    That was the prob, and a incomplete <style> tag

    Page validates now

    That "1" was driving me crazy I could see it in the code in firebug - a quick investigation led me to believe it was this snippet.

    Thanks!
      • 21257 MODX Staff
      • 730 Posts
      I have edited the original post because, as WeBe pointed out, and fruitwerks found out, the snippet should return an empty string ’’ instead of true. Silly me.
      Sorry for the frustration - this has taught me to test out code that I post here instead of just doing the stream of consciousness thing.
        Mike Schell
        Lead Developer, MODX Cloud
        Email: [email protected]
        GitHub: https://github.com/netProphET/
        Twitter: @mkschell
        • 10226
        • 412 Posts
        Would it be possible (without a major re-write) to make these size links as menu options? I tinkered around for a few, but didn’t see it happening.

        If not, I will just make some graphic links, as you can see on my site it looks horrible, but it is handy - and people are using them smiley

        http://sweetskies.fruitwerks.us
          • 33372
          • 1,611 Posts
          You mean just a drop-down menu that reloads the page with the query string? Sure. You could do something like:

          In the head:
             <script type="text/javascript">
             function jumpMenu(list) {
               location.href=list.options[list.selectedIndex].value
             }
             </script>


          Where you want the links:
          <select onchange="jumpMenu(this)">
          <option>Font Size:</option>
          <option value="index.php?fontsize=11">11px</option>
          <option value="index.php?fontsize=13">13px</option>
          <option value="index.php?fontsize=15">15px</option>
          </select>


          You could also use JavaScript to apply the CSS rule without reloading the page, but that would be a major rewrite.
            "Things are not what they appear to be; nor are they otherwise." - Buddha

            "Well, gee, Buddha - that wasn&#39;t very helpful..." - ZAP

            Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
            • 10226
            • 412 Posts
            May I am not understanding your solution, or I didn’t make myself clear...

            I would like to place these links into the existing main nav menu of the site.

            Thanks!
              • 33372
              • 1,611 Posts
              Oh... well then you could just create a weblink for each URL (using WayFinder, I presume). I kinda like these things in a drop-down menu, myself.
                "Things are not what they appear to be; nor are they otherwise." - Buddha

                "Well, gee, Buddha - that wasn&#39;t very helpful..." - ZAP

                Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
                • 10226
                • 412 Posts
                A drop-down would be cool, but how accessible is it? Honestly I could not get it to work in wayfinder so I will check out your idea when I have more time.

                Thanks!
                  • 33372
                  • 1,611 Posts
                  This method requires JavaScript, but people who turn off JavaScript shouldn’t expect anything dynamic in my opinion. Serves em right. I think this should work on pretty much any browser, but if you have trouble you can find many simpler examples on the web (oh and I guess you should add <form> tags around it for proper validation).
                    "Things are not what they appear to be; nor are they otherwise." - Buddha

                    "Well, gee, Buddha - that wasn&#39;t very helpful..." - ZAP

                    Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options