Results 1 to 2 of 2

Thread: [solved] Syndic: Print Page prints whole page not articles

  1. #1
    User
    Join Date
    03-23-10.
    Location
    Canada
    Posts
    34

    Default [solved] Syndic: Print Page prints whole page not articles

    Hello,
    An example of my problem: I have two articles on a page. I want one to be printed off by itself and the other to be just a set of instructions that is only visible online. Hit the print icon and it prints both articles.

    Before updating our Contao it was working just fine to print only the articles set as "Print as a PDF" (it had been a VERY long time since we had updated).

    Any thoughts as to how to set it to print only the article that has the syndication set as "Print the page"? Now with the Syndication settings, that certain level of detail seems to have been lost and it prints everything on the page (or it did until the posted fix for the print.css as mentioned below).

    I was having the same problem as this thread (viewtopic.php?f=6&t=2232&p=9393&hilit=pdf#p9393) and the fixed worked to get rid of the header and extraneous content. Just this one last issue of all the articles printing that I was wondering if anyone had any thoughts on.
    Thanks!

  2. #2
    Experienced user
    Join Date
    08-21-09.
    Posts
    563

    Default Re: Syndication: Print Page prints whole page not articles s

    Hi Michelle,

    Make a custom mod_article template. In that template, you can add a class to the outer <div> if the article is not printable. For example:

    Code:
    // OLD
    <div class="<?php echo $this->class; ?> block" ...
    
    //NEW
    <div class="<?php echo $this->class; ?> block<?php if(!$this->printable): ?> noprint<?php endif; ?>" ...
    So this should give articles that are not printable a class of "noprint".

    Then you can use the same principle as the other thread on them:

    Code:
    .noprint
          {
          display: none;
          }
    Brian

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •