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

    I ahve been searching high and low for a print page that will print the text of a page. I am using 1.04 of evolution. What I am having trouble with is finding a complete tutorial on the subject. It seems the best soulution is to use CSS, and I found a tutorial on this , but it is missing something. So I am saying this to see if someone has and suggestions and/or tutorials?

    Thank you


      • 3749
      • 24,544 Posts
      This will put a print button on the page:

      <div class="dontprint">
              <form><input type="button" value=" Print this page"
      onclick="window.print();return false;" /></form>
          </div>
      



      That will do it alone, but you usually want to have a custom CSS file for the printed version. because you don’t necessarily want it to look like the screen does. That means adding this to the <head> section of your template:

      <link rel="stylesheet" href="print.css" type="text/css" media="print" />


      and creating a print.css file that styles the printed page and hides any sections that shouldn’t be printed. For example, this would keep it from printing the "print" button:

      div.dontprint {
          display:none
      }


        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
        • 32347
        • 143 Posts
        Thank you

        I will try this out