Ticket #1192 (new enhancement)

Opened 14 years ago

Last modified 10 years ago

Improve the CSS print rendering

Reported by: madarche Owned by: jmorliaguet
Priority: P2 Milestone: CPS 3.4.10
Component: CPSSkins Version: TRUNK
Severity: normal Keywords: accessibility


Improve the CSS print rendering.

At the moment when one prints a page of a CPS web site, one gets all the portlets (navigation portlet, object actions portlet, etc.) on the printing rendering. This is a regression since when CPSBoxes was used a printing rendering was containing a rendering of the content only.

But CPSBoxes is not using the right approach though: CPSBoxes is flagging some boxes with a "doNotPrint" class which is neither semantic nor flexible.

Could the right approach be to be able to specify "class" and "id" for the HTML rendering of a portlet? Then we would be able at installation to specify specific ids for the column portlets and then specify in a print media CSS that those ids should not be displayed.

Change History

comment:1 Changed 14 years ago by jmorliaguet

It is possible to add ids to portlets and other elements

<div id="...">

and to let the webdesigner decide how the page should be printed by creating or customizing a print media stylesheet.

But I wouldn't want to have that by default though, since we are also printing pages from a graphical perspective and we want to see what they look like in a WYSIWYG format. It would be quite annoying to have 90% of the page artificially removed without any control on, that would be a regression :-).

I think it's OK, if there's an easy way to decide which portlets will be hidden when printed, but I don't see a simple solution to it with the zope2 version.

comment:2 Changed 14 years ago by jmorliaguet

also note that this would most certainly break the "printable themes" that people have created.

Some printable themes actually use portlets for displaying a logotype, the last modification date of the document, the date when it was printed etc. So filtering out that information would be a problem.

comment:3 Changed 14 years ago by sfermigier

  • Priority changed from P3 to P2
  • Milestone changed from CPS 3.4.1 to CPS 3.4.2

comment:4 Changed 13 years ago by lregebro

I'm not sure whats wrong the the "doNotPrint" class. Obviously this would need to be flagged on a per portlet basis, so that it has a setting which determines if it gets printed or not. That seems to me to be a easy, flexible and user-friendly solution.

comment:5 Changed 13 years ago by madarche

From the user point of view having an option, in the Portlelt Manager, for each portlet stating whether this portlet should be printed or not would be very nice.

That's as you say Lennart easy, flexible and user-friendly. And it's even easier than maintaining a dedicated Printable Theme (that one has to keep synchronized). But of course in some cases one cannot avoid to build a Printable Theme when the print view to obtain is too different from the web view.

Now from the code perspective there are 2 possible solutions :

  1. generate from CPSSkins a print media CSS with the "display: none;" directive for each portlet marked as "not to be printed"
  1. put "doNotPrint" class in the HTML generated by each portlet

The solution 1 is semantic and more web and CSS oriented (not cluttering the web pages with display informations), and thus I find it better.

Anyway no matter which of solution 1 or 2 is chosen we should delete all "doNotPrint" hardcoded information in CPS.

And finally about the

<div id="...">

around each portlet, this seems to be the situation that we have now. So this is great.

comment:6 Changed 13 years ago by madarche

  • Keywords accessibility added

comment:7 Changed 10 years ago by gracinet

  • Milestone changed from CPS 3.5.0 to CPS 3.4.10

The default theme system in trunk is CPSDesignerThemes now

Note: See TracTickets for help on using tickets.