We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • Am I missing something when creating Dashboard widgets?

    I create a simple HTML widget with a size of double but it is still only one row high, I change it to full and it is the same height as double.

    According to the documentation: "Size - Widgets come in 3 sizes - half, full, and double. A half-sized widget takes up half of one row. A full takes up one whole row. A double takes up 2 rows."

    This question has been answered by pyrographics. See the first response.

      • 49407
      • 159 Posts
      I think it's referring to containers in the layout. One column container, a full row container, or two row containers.

      If your widget doesn't fill up two row containers in CSS it will appear as a single row for responsiveness.

      Correct me if I'm wrong, but that's been my understanding. I'd like further clarification if I am wrong, also.
        • 3749
        • 24,544 Posts
        That's correct. The height of a widget is determined solely by how much content it displays. The settings only control the width. If you want it taller, you could throw in some
        tags. I think you could also use CSS to set wide margins and/or padding.
          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
        • Thanks for your replies. I am putting in an iframe with an 800 pixel height using CSS. It starts scrolling vertically after approximately 400 pixels are shown no matter if using full or double.
          • discuss.answer
            I figured it out, sort of. The index.css template file has a .dashboard-block .body style in it that sets the maximum height of all dashboard blocks to 300px even though the double block is supposed to be a minimum of 400px. I commented it out and it works (at least until the next update). I have a github issue opened on this.
              • 3749
              • 24,544 Posts
              You should be able to override that in your own CSS file. If the widget uses PHP, the CSS can be loaded by the widget with $modx->regClientCss(). That will load it after all the Manager CSS.
                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