Printable Page (beta) on Dogbowl
An experimental
By taking advantage of the new Skins feature of the CMF, making
"Printable Pages" is now much easier than it normally would be
in Zope proper. Making a Printable Page typically involves
getting rid of sidebar and other extras that are good on screen
but not good on a printed document - something very useful when
building knowledge management sites which feature articles one
might want hard copies of.
To implement this feature on your own CMF site, do the following
steps:
1. In the 'portal_skins' tool, create a new folder to hold
your customized skin with an id like 'Printable'.
2. Go to the 'portal_skins/generic' folder and click on
'standard_html_header'. Since this is a file-system
DTML file, you can't customize it here. Instead, there's
a form to let you copy the source to a skin folder (a
folder that's in the Skins tool). Select 'Printable'
and click 'Customize'.
3. You'll be brought to the management screen for
'portal_skins/Printable/standard_html_header'. From here,
you can customize it how you want. The simplest thing
to do is to remove the links to style sheet information,
and get rid of the layout table (especially the
*actions_box* reference).
4. Go back to 'portal_skins/generic' and repeat step 2 for
'standard_html_footer'. There are some closing table
tags for the normal layout table, those need to be
removed.
5. Optionally, you can also go to 'portal_skins/no_css' and
do a 'Customize' on the 'stylesheet_properties' item.
6. Now we can finally make a Skin! Go to the 'portal_skins'
tool itself and click on the 'Properties' tab. There should
be a table of existing skins, with a blank row at the
bottom. If the right-hand values in the table have slashes
in them (ie, 'control/Generic/custom'), enter the following
into the blank row:
o Name: **Printable**
o Layers: **control/Generic/Printable**
If you see commas in the right-hand column, (ie,
'custom, Generic, control'), enter the following into
the blank row:
o Name: **Printable**
o Layers: **Printable, Generic, control**
Then click the 'Add' button. You've just created a skin.
7. To use it, you need to put a link somewhere to get to
the printable page. On the 'portal_skins' tool properties
is "Request variable". It's default value is 'portal_skin'.
This is what is looked up in the REQUEST to find the skin
(and if it's not found, a cookie, member data, and then
the default skin settings are used to determine which skin
to use). The link (try skinning 'standard_top_bar' into
the 'custom' skin) can be as simple as something like::
print
This is basically how this feature was added to the dogbowl.
It may seem like a lot of steps, but it is actually quite
an improvement over the way it is done on Zope.org and
classic.zope.org.