- Moderated by:
- Support
-
- rank:
-
Legend
- registered:
- December 1969
- Status:
- online
- Posts:
- 6533
I'm developing a module for a client and I need to beable to present a printable view of one of the reports, with out the pnFrame, how do I do this?
Do I just have to make the print function non API compliant? -
- rank:
-
Helper
- registered:
- December 2002
- Status:
- offline
- last visit:
- 24.11.08
- Posts:
- 176
Dont include the header then. Or use the AutoTheme function to call special layout page and CSS file for that particular pagetype. -
- rank:
-
Moderator
- registered:
- March 2002
- Status:
- offline
- last visit:
- 26.08.08
- Posts:
- 7720
For the moment if you don't return the output back to PN then you can output your own header and footer within a function. For PN .8x we'll have a printer theme that will allow a printable view from any page of a site by appending theme=Printer to the URL.
-Mark -
- rank:
-
Moderator
- registered:
- March 2002
- Status:
- offline
- last visit:
- 26.08.08
- Posts:
- 7720
-
- rank:
-
Legend
- registered:
- December 1969
- Status:
- online
- Posts:
- 6533
THe thing with the blockless theme method is that it still has the module's navigation in it, which I'd not want in the print view.
Last question, I've got the printable view function written (pretty easy) but what I'd like is to make the view open in a second window, so I don't have to put any navigation stuff on there. Does taht mean I need to make the URL with out use of pnModURL? (Or whatever that function is) or is there some way to pass the open in new window to the function? -
- rank:
-
Moderator
- registered:
- March 2002
- Status:
- offline
- last visit:
- 26.08.08
- Posts:
- 7720
mhalbrook
THe thing with the blockless theme method is that it still has the module's navigation in it, which I'd not want in the print view.
Last question, I've got the printable view function written (pretty easy) but what I'd like is to make the view open in a second window, so I don't have to put any navigation stuff on there. Does taht mean I need to make the URL with out use of pnModURL? (Or whatever that function is) or is there some way to pass the open in new window to the function?
I'd attach a little bit of javascript code to the link or button to open a new window of a fixed size if you really must have it in a new window. If using a link you could use target="_blank" but I wouldn't recommend this since it won't validate to strict HTML or XHTML doc types.
Opening things in a new window without giving the user a choice is bad interface design hence the removal of the target attribute. This particular facet of design has really hit me since i've started using a browser with tabbed browing. It now annoys me when a site pops up a new window from a link. If i'd have wanted a new window i'd have right clicked and asked the link to be opened in one.
-Mark -
- rank:
-
Moderator
- registered:
- March 2002
- Status:
- offline
- last visit:
- 26.08.08
- Posts:
- 7720
ColdRolledSteel
You could also use the PrintAnyPage hack from www.mtrad.com. It does what you want.
(And I'm pretty sure that's where they got the idea for PN .8)
Craig,
Your always an inpsiration..... ;) Seriously though, yes, it was in part your printanypage hack that brought the theme about. A print.php hack posted to noc.postnuke.com ended up as some xanthia plugins to deal with the links being turned into footnotes feature.
-Mark -
- rank:
-
Helper
- registered:
- December 2002
- Status:
- offline
- last visit:
- 24.11.08
- Posts:
- 176
Quote
A print.php hack posted to noc.postnuke.com ended up as some xanthia plugins to deal with the links being turned into footnotes feature.
Where can I find this one? That would be nice for the PDF thing I did.
