We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42689
    • 125 Posts
    hy,
    i want to create custom page in mod'x manager, i have follow that reference for that

    http://rtfm.modx.com/display/revolution20/Custom+Manager+Pages+Tutorial

    in this we can get the content of the page

    <?php
    return 'This is my first Custom Manager Page';
    ?>


    but we can't use the print, or echo, or raw HTML in our PHP. If we use any of these, i'll find that the text floats to the top of the page; remember that a Custom Manager Page is really acting as a function, so it should return a value.

    so can some one know that how can we use print, or echo, or raw HTML in create custom page in mod'x manager..

    Thanx smiley
      • 40706
      • 128 Posts
      You could use an output buffer to use echo like this:

      <?php
      ob_start();
      echo "This is my first Custom Manager Page";
      
      // .. more rows more echo`s
      
      
      $return = ob_get_contents();
      ob_end_clean();
      return $return;



      But of corse you could stich all in one variable together instead of echo it and return that one big Variable.