[Zope-CMF] Extending the DTML Language...

Tres Seaver tseaver@zope.com
Thu, 13 Sep 2001 06:19:12 -0400


Josef Albert Meile wrote:

> Thank you very much for your answer. But actually the idea of a new tag is
> to make easier to the users to post content on my portal. I think that for
> them would be easier to write something like:
> <dtml-td>
>   text goes here
> </dtml-td>
> 
> Rather than:
> <td>
>   &dtml-td;
>   text goes here


> </td>
> 
> I think on this way because most of them knows how to write homepages in
> HTML and with this sintax, they just have to remmember that each tag (ie:
> <td> or <li>) must start with "dmtl-". On the other hand, with the other
> method, they don't use a closing tag, so, it could be confused. For example,
> they could make a lot of mistakes by writing "</&dtml-td>" which doesn't
> exist in the system.


You *can* make a product which defines DTML tags;  see the
Calendar tag product on www.zope.org.  However, CMF content is
*not* interpreted as executable code, so your users won't be able
to embed your tag into a document.

CSS is probably your best bet;  it is generally possible to
come fairly close to the same presentation across NS4, IE5, and
Mozilla, although the stylesheet is sometimes a bit verbose.
For instance, this HTML renders fine on both Moz and NS4 (I
presume IE as well, but I don't run windows):

<html>
<style type="text/css">
.red {
     color: White;
     background-color: Red;
}
.green {
     color: White;
     background-color: Green;
}
.blue {
     color: White;
     background-color: Blue;
}
</style>
<body>
<table>

  <tr>

   <th class="red"> Red </th>
   <th class="green"> Green </th>
   <th class="blue"> Blue </th>

  </tr>

</table>
</body>
</html>



-- 
===============================================================
Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com