[Zope] Boolean dtml redux
Michel Pelletier
michel@digicool.com
Tue, 3 Jul 2001 13:55:04 -0700 (PDT)
On Tue, 3 Jul 2001, Leigh Ann Hildebrand wrote:
> I'm sorry to post about this *again*, but I have still gotten no answer
> that works. I've spent a week now, changing the same 3 lines to various
> permutations, and none of the suggestions has worked. So, here again:
>
>
> <dtml-in expr="_[foldername].objectValues()" sort="bobobase_modification_time"
> reverse>
> <dtml-unless "_['id']=='index_html'">
> <li>
> <a href="<dtml-var absolute_url>"><dtml-var title></a><br>
> Maintained by <dtml-var maintainer missing="No maintainer">. <br><dtml-var
> description missing="No description."> Last revision date <dtml-var version_date
> missing="unknown">.
> </dtml-unless>
> </dtml-in>
>
> The problem: I need to change the line
> <dtml-unless "_['id']=='index_html'"> so that it's "unless the
> object boolean index_hide property is true for the particular object".
This sentence doesn't make any sense. index_hide is a boolean property of
what? What is the particular object?
I can't give you a solution because of that, but I can give you a tip, you
don't need to say "['id']", you can just say "id". The ['x'] syntax is
for when 'x' is not a valid name in a python expression. 'id' is valid.
"The Nut-House" is not valid and so you would use the "['The Nut-House']"
syntax. A valid python name is any combination of letters, numbers, or an
underscore (no spaces or any other symbols). A name also can't start with
a number, ie 5bob is illegal, but bob5 is fine.
-Michel