Support Forum

Please note that this forum is only available to you in read only mode. In order to contribute to this conversation you will need to renew your subscription.

Print in New LifeStyle

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Hi. I have come across the following problem with the Print function in the NewLifeStyle template.

When I Print using the template Print button (the one on the dropdown menu), dynamic table data on the page does not print.

When I use the native print function in any browser, the page and all dynamic table data on the page prints as expected.

I have attached a screenshot that should demonstrate.

What could be going on? One of our project requirements is to be able to print from a button on the screen, and I am very worried about this since I assumed it would just work as expected.

Thank you for any help!

I am using Joomla 3.2.2



print.jpg
  • hpinson's Avatar
  • hpinson
  • 12 Month basic
  • 62 posts
  • Karma: 0
The administrator has disabled public write access.
Do you have a link for the page in question?

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
Yes, thanks!

dev.nmjpec.org/en/index.php?option=com_content&view=article&id=29&year=2002&district=13

and

dev.nmjpec.org/en/judge-evaluation?election_id=43

In both cases select the print icon.

Page content, which is generated dynamically does not print.
  • hpinson's Avatar
  • hpinson
  • 12 Month basic
  • 62 posts
  • Karma: 0
The administrator has disabled public write access.
And if you try the browsers print function, page table data prints as expected.
  • hpinson's Avatar
  • hpinson
  • 12 Month basic
  • 62 posts
  • Karma: 0
The administrator has disabled public write access.
This is something that is really expected. Here is why

1. The browser print function prints the entire HTML page, when it is already rendered in the browser. That is why your dynamic content prints correctly. It is already rendered and present on the page

2. The Joomla print function uses Joomla print mechanisms to print a web page. It runs Joomla plugins to render the page. Since not every Joomla plugin is written to be run by the print function, you won't see the same output on the print page as you would see on the regular Joomla page layout
  • mihha's Avatar
  • mihha
  • 12 Month Developer
  • 711 posts
  • 44 Thanks
  • Karma: 11
The administrator has disabled public write access.
Ok. It sounds like the Joomla print system is not what we need to rely on, and that it is not a template issue.

Do you know of a way to control what positions in the template do and do not get printed.

A simple example would be how to exclude anything in sidebar-2 from printing.
  • hpinson's Avatar
  • hpinson
  • 12 Month basic
  • 62 posts
  • Karma: 0
The administrator has disabled public write access.
Hi

If its a case of adding a few styles to the print you would use a media query

@media print {
.row-fluid .span2 {display: none;}
}

I did this as a test to remove the judges pic from this page
dev.nmjpec.org/en/judge-evaluation?election_id=54

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
That sounds like it would work well.

I am adding a print.css, where in the template would I include that? In: tpls/blocks/head.php perhaps right below where the custom.css is referenced?
  • hpinson's Avatar
  • hpinson
  • 12 Month basic
  • 62 posts
  • Karma: 0
The administrator has disabled public write access.
Hi

I'd try adding in the custom code section

Before head so its the last css file

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Happy Campers