Fork me on GitHub

Watch

GitHub Core

Show your support for Zikula! Sign up at Github account and watch the Core project!




GitHub Modules

Forum Activity

Forum feed

» Visit forum | » View latest posts

Printer-Friendly Pages -> PrintPage()  Bottom

  • Hi all,
    I'm trying to add a link to a printer friend page for my module. I used this little bit of code at the end of the function to make that happen.

    Code

    $output->TableEnd();

       if($display == "print")
       {
           $output->PrintPage();

       }


       return $output->GetOutput();

    I get a nice page view that is printer friendly. However, if I click back on the browser and click the printer-friendly link again, the HTML for that page is displayed instead of a nice printer-friendly page. If I were to click on any other link, the page looks normal.

    Does anyone know what is causing this? Ideally, I'd like the printer-friendly page to open in a new browser window, but I don't know how to do that within the pnAPI.

    Thanks in advance for your help
  • I've not tried to do this myself but take a look at some of static content modules as many of these will have printer friendly pages (e.g. htmlpages, content express as two API compliant ones).

    For PN .8 we're taking a different approach that won't require any coding - the introduction of a printer theme. See http://pnlab.markwes…id=11&theme=Printer for a demo.

    -Mark

    --
    Visit My homepage and Zikula themes.

This list is based on users active over the last 60 minutes.