[Zope] One week of Zope-expirience

Tony McDonald tony.mcdonald@ncl.ac.uk
Wed, 31 Mar 1999 10:22:53 +0100


>
>Now some questions:
>
>1. Have you used CSS-sheets in Zope and how did you use them? Did you
>incorporated them into Zope or not? Have you got a little sample?
>

In Zope, this is pretty easy.
Create a property at your top level of type 'lines' and called 'css' 
(you can also create a DTML document/method if you like). Populate it 
with good CSS things like (this is from the Zope site itself 
actually).

<STYLE TYPE="text/css"><!--
	.clean { font: 10pt Verdana, Geneva, Arial, sans-serif }
	.clean dt { text-decoration: underline }
	th.clean { font-weight: bold; }
	.headbottomrow td { border-bottom: 2px solid #936 }
	.header { color: #004488; font-weight: bold; font-size: 14pt; 
font-family: sans-serif }
	.smallclean { font: 9pt Verdana, Geneva, Arial, sans-serif }
	.smallclean dt { text-decoration: underline }

H1, H2, H3, H4{
  font-weight: bold;
  color: #000000;
  font-family: Verdana, Helvetica, sans-serif;
}

H1{ font-size: 16pt;}
H2{ font-size: 14pt;}
H3{ font-size: 12pt;}
H4{ font-size: 10pt;}

/* end hiding content from old browsers */ -->
</STYLE>

In standard_html_header you put something like
<HTML><HEAD><TITLE><!--#var title_or_id-->
</TITLE>
<!--#var css-->
</HEAD><BODY BGCOLOR="#FFFFFF">

and you're away...

You may want to change standard_html_header so it doesn't crash if 
css is not present.
<HTML><HEAD><TITLE><!--#var title_or_id-->
</TITLE>
<!--#if css-->
<!--#var css-->
<!--#/if -->
</HEAD><BODY BGCOLOR="#FFFFFF">

Now where it starts to get really cool is that all your documents 
*below* the top level get the CSS information by acquisition, but you 
can change CSS information in folders by creating a new CSS property 
or document within that folder.

Tres Neat.

hth
tone

------
Dr Tony McDonald,  FMCC, Networked Learning Environments Project
The Medical School, Newcastle University Tel: +44 191 222 5888
Fingerprint: 3450 876D FA41 B926 D3DD  F8C3 F2D0 C3B9 8B38 18A2