You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Vitezslav Smid <vi...@gmail.com> on 2007/11/29 18:33:01 UTC
GHOP #23
Hello,
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.
Vitezslav Smid
---
jabber:: vitezslav.smid@jabber.org
www:: http://vitezslav-smid.net
Re: GHOP #23
Posted by Tim Funk <fu...@joedog.org>.
(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 <vi...@gmail.com> 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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: GHOP #23
Posted by Yoav Shapira <yo...@apache.org>.
On Nov 29, 2007 12:33 PM, Vitezslav Smid <vi...@gmail.com> 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?
Yoav
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org