(I swamped with other projects this week)

Hopefully here is enough detail:

For the site
1) In site/trunk/xdocs/stylesheets/tomcat-site.xsl - this is the file to change.
Below
<link type="text/css" href="stylesheets/tomcat.css" rel="stylesheet" />
add
<link type="text/css" href="stylesheets/tomcat-printer.css" rel="stylesheet" media='printer'/>

2)
In tomcat-printer.css - add a style
.noPrint {display:none}

3) Back in site/trunk/xdocs/stylesheets/tomcat-site.xsl - sprinkle class='noPrint' as needed

-------------------------------
For tomcat {version} its a little more involved. Preferably this is done on trunk.

There is some XSL to chuck in webapps/docs/tomcat-docs.xsl which has some if/else logic to decide when to hide stuff in printer freindly versions. Since those physical docs will go away - many of those if checks can go away and be altered with class='noPrint'

For example:
        <!-- Don't generate a menu if styling printer friendly docs -->
        <xsl:if test="$project-menu = 'menu'">
          <xsl:comment>LEFT SIDE NAVIGATION</xsl:comment>
          <td width="20%" valign="top" nowrap="true">
            <xsl:apply-templates select="project/body/menu"/>
          </td>
        </xsl:if>
Becomes:
        <xsl:comment>LEFT SIDE NAVIGATION</xsl:comment>
        <td width="20%" valign="top" nowrap="true" class='noPrint'>
          <xsl:apply-templates select="project/body/menu"/>
        </td>


Also in webapps/docs/build.xml there will be some code to trim out since the style task doesn't need run additional times for printer friendly versions.

****
One gotcha about the style task, if you change the xsl file and re-run the build - typically nothing happens. You need to chuck the generated files (or touch the xml files)
****

I'll try to get more details this evening if I was too vague about the above.

-Tim

Yoav Shapira wrote:
On Nov 29, 2007 12:33 PM, Vitezslav Smid <[EMAIL PROTECTED]> wrote:
I've just claimed GHOP Issue #23 so I'm writing for more information.
How should the printer-friendly version look? Should it simply copy the
current layout?

I know CSS very well, but with XSLT I'm rather a beginner.

Tim, I believe this was your idea.  Can you please share some details
with Vitezslav?


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to