[Zope-CMF] bug in printable page with skins ?

Tres Seaver tseaver@palladion.com
Mon, 28 May 2001 10:13:25 -0400


Lucas Hofman wrote:

> While implementing printable page functionality using the how-to from
> the dogbowl I encountered something which I am not sure whether it is a
> bug or a feature:
> 
> I needed a different stylesheet (not just different stylesheet
> properties) to be used for the printable page. I copied
> default_stylesheet to the printable folder and customized it. 
> 
> The result worked fine in NS4, but on in MSIE or Opera. The latter used
> the normal stylesheet. The reason is that when the url looks like
> URL?portal_skin=Printable the <dtml-var> lookups, used for NS4, work ok,
> but the <link ;;;href="&dtml-portal_url;/&dtml-sheet;" ...>, used for
> MSIE, does not use the same skin as the containing page.


The reason it worked for NS4 is that we "inline" the stylesheet for NS4
as a workaround for its brokenness with respsct to stylesheets referenced
via the '<link type="stylesheet"...>' construct.


> The workaround is simple: custome ccs_inline_or_link to the printable
> directory and change the <link> statement to refer to
> href="&dtml-portal_url;/printable/&dtml-sheet;". However, this feels
> like a kludge.
> 
> Any enlightening insights around?


Another option:  since you probably customized the 'standard_html_header'
anyway, you could inline the stylesheet in it, rather than using
'css_inline_or_link':

   <dtml-var css_inline_or_link>

would be replaced with:

      <style type="text/css">
      <!--
      <dtml-var default_stylesheet>
        -->
      </style>


Tres.