Results 1 to 3 of 3

Thread: Print button print whole page not main content

  1. #1
    User
    Join Date
    06-20-09.
    Location
    Middlesbrough, UK
    Posts
    246

    Default Print button print whole page not main content

    Hi,

    I have an issue with the print button included in the article section along with the pdf, facebook and twitter buttons.

    When printing it prints the whole website including header, left and right nav and footer.

    Should it do this? I hoped it would just print the main content. Is there anyway I can get it to just print the main content just like the PFD button only shows main content.

    I don't really want to have to get people to view a pdf and then print that as it isn't very intuative or simple enough for people.

    I'm sure this has been mentioned before but couln't find the topic it was in and I've checked the demo site and this is the default action on there too.

    Is there any way around this?

    Any help appreciated.
    Ben
    360fusion: Virtual Tours - Web Design
    Social Media: Twitter - Facebook Page

  2. #2
    User
    Join Date
    06-19-09.
    Posts
    417

    Default Re: Print button print whole page not main content

    Hi Ben,

    Unsure if I have misunderstood, but is as simple as creating a print.css file with a media type of print.

    The get rid of the bits you do not want like:

    #header { display:none; }
    #left { display:none; }

    Cheers, Gary.

  3. #3
    User
    Join Date
    06-20-09.
    Location
    Middlesbrough, UK
    Posts
    246

    Default Re: Print button print whole page not main content

    Hi Gary,

    Yes, it really was that simple. I had a css file for print but this was just the default one that comes with Contao. I assumed that this is how it would be set by default.

    I've hidden all content i don't want and it works a treat.

    Many thanks
    Ben
    360fusion: Virtual Tours - Web Design
    Social Media: Twitter - Facebook Page

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
  •