Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 07:01 AM
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 06:41 AM
- ehdwma created topic »Hide "Register new account" and change template to 3 col« 06:27 AM
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 01:29 AM
- mdee created topic »How to implement returnpage ?« 01:00 AM
- nestormateo responded to »Fillters in Clip« 24. May
- damon responded to »Can the Updated Version Check be Turned Off (Z 1.3)« 24. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
"Print" view?
-
**unknown user**
- Rank: Softmore
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 379
In the current module I'm working on, I want to have an option for the user to click on a link and have a pop-up window appear, showing the same information the previous page did, but in a clean format, minus the Postnuke stuff, so that they can print just that information. Is there a way to do this and still have it all compliant and stuff? My brain is not coming up with anything, but I had a root canal yesterday, so I am likely missing something that's blindingly obvious. :? -
**unknown user**
- Rank: Softmore
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 379
I've been playing around with the "popup" code, but it doesn't seem to do quite what I want it to do. I get a little pop-up window, but it looks more like the onMouseOver stuff you can do with Javascript than what I really want. -
**unknown user**
- Rank: Softmore
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 379
Okay, now I feel like an idiot.
My plan: Make a link on the Postnuke page with a target to go to a new window. Send it the information I need, or at least the id of the information I need. Use that form to print out the "print view." I think I'm going to get lunch before I try that.
Any other ideas would be greatly appreciated. -
**unknown user**
- Rank: Softmore
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 379
I take it all back. I have no idea how to do this. I've been trying all afternoon. *beats head on desk*
It would all be pretty simple if I could send an array through a form. Otherwise, I'm going to have to include database calls and stuff, and I KNOW there's gotta be an easier way.
Pop-ups, anyone? -
- Rank: Expert
- Registered: Mar 15, 2003
- Last visit: Oct 21, 2009
- Posts: 1221
I would design a no frills theme and then call a second window with the URL and ?theme=blandtheme on the end.
--
Zikula Themes -
- Rank: Team Member
- Registered: Mar 18, 2002
- Last visit: Oct 21, 2009
- Posts: 6606
PN .760 comes with a printer theme for this exact purpose.
-Mark
--
Visit My homepage and Zikula themes. -
- Rank: Developer
- Registered: Dec 31, 1969
- Last visit: Jun 01, 2010
- Posts: 6859
760 is still in RC stages at the moment, CRS has a printer type theme at MTRad.com I think.
--
Home Page | Find on Facebook | Follow on Twitter
-
**unknown user**
- Rank: Expert
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 1193
It's called PrintAnyPage from http://www.mtrad.com. -
- Rank: Freshman
- Registered: Nov 29, 2004
- Last visit: May 28, 2009
- Posts: 69
To display content without the postnuke stuff
you can just do the following ( note that display()
is used instead of fetch() ):
Code
$pnRender =& new pnRender('MODULE');
$pnRender->assign('whatever', $whatever);
// output html
$pnRender->display('MODULE_print_something.tpl');
// tell postnuke not to output anything else
return true;
Alexan -
- Rank: Team Member
- Registered: Mar 18, 2002
- Last visit: Oct 21, 2009
- Posts: 6606
alexan
To display content without the postnuke stuff
you can just do the following ( note that display()
is used instead of fetch() ):
Yes.... but the advantage of the theme approach is that it's a one off solution that then doesn't require any coding within the module - Every single 'page' within the site has an instant printable view. In .760 we've dropped the printable page code from the sections module and used the printer theme instead.
You could incorporate into your theme templates a link that views the current page with &theme=Printer appended.
At the end of the day why write code you don't have too...
-Mark
--
Visit My homepage and Zikula themes. -
- Rank: Freshman
- Registered: Nov 29, 2004
- Last visit: May 28, 2009
- Posts: 69
yes Mark you right theme is the quickest/easiest way.
I was just giving more options ...
the display() approach could be used
if you want to reformat the display
of your data for better printing
(rather than browser viewing)
or
maybe have a lot of different printing
frames for different data ... I'd
rather have 5 templates than 5 different
themes for this
I know theme could do both …
alternatives do no harm though
nice "footnotes" plugin in the Printer theme by the way...
Alexan
--
Cytopia - Download Psytrance
Athens Pub Crawl -
**unknown user**
- Rank: Softmore
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 379
I did a combination of both. There were certain things I didn't need displayed in the print view (Edit and Delete links, frex, and colors, too) that I needed in the regular view, so I made print view functions to not display those, and then I made the bland theme to display without the postnuke bars and block. Quite easy, once I figured out how to make the theme. :)
- Moderated by:
- Support
Users on-line
- 0 users
This list is based on users active over the last 60 minutes.
