[Zope] Boolean dtml redux
Leigh Ann Hildebrand
leighann@onebox.com
Tue, 03 Jul 2001 14:30:06 -0700
---- Michel Pelletier <michel@digicool.com> wrote:
> > 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'll try to be more clear.
I have a number of folders: "PrelimDocs", "HowToDocs", "HARPDocs", etc.
In each of these folders I have a number of objects: dtml documents,
files (pdf, MSWord, .zip and .sit), and some folders.
The dtml method I posted is used in the index_html files of the the document
folders, to generate a index listing of the documents/objects in the
folders.
My problem is that within some folders, there are documents (objects)
that I don't want to show up in the index_html dynamic listing. For that,I
had this idea I'd use this index_hide property. If I didn't want a document
to be listed, I'd just set an index_hide property for it.
Better explanation?
> 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.
Well, err, actually, for reasons I'm not entirely sure I could explain,
those methods don't work in this case. I worked with a number of the
fine gentlemen on #zope about the problem, and we discovered together
that nothing short of the full _['id'] would work.
Leigh Ann
__________________________________________________
FREE voicemail, email, and fax...all in one place.
Sign Up Now! http://www.onebox.com