[Zope] Newbie: dtml-unless

sam gendler sgendler@akamai.com
Sun, 11 Mar 2001 20:18:40 -0800


--------------0E63BF9AC6540478D77A46F8
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Try putting the dtml-unless tags inside the loop.  Currently, you are only
testing the id of the document that is calling this method.  If you put htem
inside the loop, you will be testing the id of the current index of the
iteration.

--sam

Stephan Goeldi wrote:

> I'd like to list the content of a folder, except if it is the
> standard_html_header or footer. I use this code:
>
> <dtml-unless "'id' == 'standard_html_header'">
> <dtml-unless "'id' == 'standard_html_footer'">
> <dtml-in expr="foldername.objectValues()">
> <a href="<dtml-var absolute_url>"><dtml-var id></a><br>
> </dtml-in>
> </dtml-unless>
> </dtml-unless>
>
> It works except of the fact, that standard_html_header and footer are listed
> anyway. Can anybody point me into the right direction please?
>
> TIA
> -goe-
>
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )

--
-----------------------------------------------
"The language and concepts contained herein are
 guaranteed not to cause eternal torment in the
 place where the guy with the horns and pointed
 stick conducts his business."
                                  --Frank Zappa



--------------0E63BF9AC6540478D77A46F8
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Try putting the dtml-unless tags inside the loop.&nbsp; Currently, you
are only testing the id of the document that is calling this method.&nbsp;
If you put htem inside the loop, you will be testing the id of the current
index of the iteration.
<p>--sam
<p>Stephan Goeldi wrote:
<blockquote TYPE=CITE>I'd like to list the content of a folder, except
if it is the
<br>standard_html_header or footer. I use this code:
<p>&lt;dtml-unless "'id' == 'standard_html_header'">
<br>&lt;dtml-unless "'id' == 'standard_html_footer'">
<br>&lt;dtml-in expr="foldername.objectValues()">
<br>&lt;a href="&lt;dtml-var absolute_url>">&lt;dtml-var id>&lt;/a>&lt;br>
<br>&lt;/dtml-in>
<br>&lt;/dtml-unless>
<br>&lt;/dtml-unless>
<p>It works except of the fact, that standard_html_header and footer are
listed
<br>anyway. Can anybody point me into the right direction please?
<p>TIA
<br>-goe-
<p>_________________________________________________________________________
<br>Get Your Private, Free E-mail from MSN Hotmail at <a href="http://www.hotmail.com">http://www.hotmail.com</a>.
<p>_______________________________________________
<br>Zope maillist&nbsp; -&nbsp; Zope@zope.org
<br><a href="http://lists.zope.org/mailman/listinfo/zope">http://lists.zope.org/mailman/listinfo/zope</a>
<br>**&nbsp;&nbsp; No cross posts or HTML encoding!&nbsp; **
<br>(Related lists -
<br>&nbsp;<a href="http://lists.zope.org/mailman/listinfo/zope-announce">http://lists.zope.org/mailman/listinfo/zope-announce</a>
<br>&nbsp;<a href="http://lists.zope.org/mailman/listinfo/zope-dev">http://lists.zope.org/mailman/listinfo/zope-dev</a>
)</blockquote>

<pre>--&nbsp;
-----------------------------------------------
"The language and concepts contained herein are
&nbsp;guaranteed not to cause eternal torment in the
&nbsp;place where the guy with the horns and pointed
&nbsp;stick conducts his business."
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --Frank Zappa</pre>
&nbsp;</html>

--------------0E63BF9AC6540478D77A46F8--