[Zope-CMF] ZPT and stylesheets again!

Jon Edwards jon@pcgs.freeserve.co.uk
Fri, 18 Jan 2002 14:35:45 -0000


Sorry to bring this up here again, but I'm getting no replies from the ZPT
list, so I thought I'd try a different approach.

In the head of main_template I put -

 <link rel="stylesheet" href="dw_stylesheet.css"
       type="text/css"
       tal:condition="here/ttw_styleedit"
       tal:attributes="href here/zpt_stylesheet/absolute_url">

- my (limited) understanding of ZPT is that if the boolean-property
"ttw_styleedit" is true, the href would be
"here/zpt_stylesheet/absolute_url", if it's false, it would ignore the
tal:attributes bit and leave the href as "dw_stylesheet.css"

It replaces the href if ttw_styleedit is true, but if it's false, it omits
the whole <link> tag - just a blank space

I also tried tal:condition="here/ttw_styleedit|default", but that made no
difference

I can get round it by putting two <link> tags in the head, with different
conditions, but that might confuse people editing via Dreamweaver. Can
anyone point me in the right direction please?

Cheers, Jon