[Zope] Surpress white space?

Jaroslav Lukesh lsh@wo.cz
Wed, 9 Jul 2003 12:49:14 +0200


> Odes=EDlatel: Sergey Volobuev <zope@phpv.khv.ru>
> >Is there an easy way to surpress all whitespace output from DTML?
> >Essentially, I have a situation where DTML is used for a crutch to do
some
> >simple logical things, but where most of the interesting stuff happens
in
> >external methods. There are a few lines of DTML that actually produce
> >useful output, but I am getting a TON of whitespace before my
interesting
> >output that I need to surpress.
> >
> I also trying to solve this problem and the only way i've found is avoi=
d=20
> whitespace between dtml tags. Like this:
>=20
> <dtml-in xxx><dtml-if
> comecondition><dtml-var
> somevariable></dtml-if></dtml-in>
>=20
> Of course, this is ugly solution because it makes code almost unreadabl=
e
:(

Better solution:

<dtml-in rev
  ><dtml-with sequence-item
    ><a href=3D"<dtml-var absolute_url>/" class=3D"navipath"><dtml-var
title_or_id></a
  ></dtml-with
  ><dtml-if sequence-end
      ><br>
  <dtml-else>
      ,&nbsp;
  </dtml-if
></dtml-in>


Regards, JL.