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

    I am developing some CMPs that require CSV export functions. In Evo I would just ensure my module sent the correct headers and echoed the correct CSV body and all was fine.

    This is Revo 2.2.0-pl2. I have created an action and ensured that "Load Headers" is unticked, and on inspection the db field modx_actions.haslayout is indeed set to 0. I am under the impression (perhaps erroneously) that this should suppress the output of the rest of the manager page i.e. it should prevent the headers and main navigation being output.

    However, although my CMP-specific is correctly outputting CSV headers and correctly sending the comma separated body, I am also getting the HTML from the MODx manager (e.g. the head and navigation) ?

    Is this a bug or have a I simply misunderstood how (or if) I can suppress the manager HTML?

    thanks,
    Tim.
      • 28215
      • 4,149 Posts
      Load Headers is deprecated as of 2.2.0 - the UX elements should have been removed but were left as an oversight. They will be removed in 2.2.1.

      In your controller class (I assume you're using the class-based controller methods that were introduced in 2.2), just set the following class vars:

      class MyControllerClass {
           public $loadHeader = false;
           public $loadFooter = false;
           
           /* my other controller code */
      }
      


      That will hide the header/footer for the page.
        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
        • 30023
        • 172 Posts
        Thanks, thats got it sorted now.

        -- Tim.
          • 34020
          • 18 Posts
          I have a similar situation except I'm not using the class-based controller. I'm using Bruno17's quickCMP (https://forums.modx.com/index.php/topic,54729.msg315441.html#msg315441). How would I disable the header and footer for this?