[Zope3-Users] css/page template ?

Marius Gedminas mgedmin at b4net.lt
Sat Feb 10 07:31:05 EST 2007


On Sat, Feb 10, 2007 at 10:34:51AM +0100, Dominique Lederer wrote:
> tyson schrieb:
> > I am having trouble getting my style sheet to load in my page template. 
> > I added my .css file within the local package directory.  How can I
> > point to this file on the filesystem.  I tried using a layer with a
> > resource in my configure file, but that didn't work.  Any help would be
> > much appreciated, thanks.
> > 
> just register your .css file as ressource via ZCML:
> 
> ...
> <browser:resource name="yourfile.css" file="yourfileonfilesystemin
> samefolder.css" />
> ...
> 
> you can access it then via  {$site}/@@/yourfile.css
> {$site} is the URL of the nearest site.

Which you can easily find in a page template, if you use

  <link rel="stylesheet" tal:attributes="href context/++resource++yourfile.css" />

Marius Gedminas
-- 
You can't have megalomania.  *I* have megalomania.
		-- Joe Bednorz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mail.zope.org/pipermail/zope3-users/attachments/20070210/604abdb0/attachment.bin


More information about the Zope3-users mailing list