3447 Posts in 1032 Topics by 872 members
|Go to End|
16 February 2010 at 4:22am
I found a jquery plugin " PrintElement" which works now after tweaking to preview the selected div element in a popup with only print stylesheet. The user then proceeds to printing it. I'm not sure however if such functionality can be done without this extra jquery plugin.. is that possible?
16 February 2010 at 8:47am
How big is the plugin? I think if there is a plugin, stick to it, it's going to save you heaps of development time. Everybody uses JS and websites are also pretty quick nowadays, with the caching, proxies and whatnots. Just have a look at yahoo.com, it serves 500kB of content on the homepage ;)
But it should be doable via silverstripe, you could define an action on the Page_controller that would render the page using another template, although if you wanted to do it in apopup, you would need to use an iframe, otherwise the stylesheets will leak from the parent page and all your work will go to waste.
16 February 2010 at 9:37am
16 February 2010 at 9:41am
Way to go, popups are evil and browsers try to block them anyway. With JS popup we wouldn't get into the <body> problem in the first place, although I admin it's a CMS bug
|Go to Top|