[Zope] Re: Document Title
Terry Babbey
terry@lambton.on.ca
Tue, 11 Jul 2000 15:29:29 -0400
Here is my next problem ... I have a variable called ProgCode. That is where I
store the College Program I want to look up information on (eg. T043). Now all
the dtml documents associated with program T043 have T043 as the base of their
name and then the names have extra characters (eg. T043PIC is the picture
associated with the T043 program). So what I want to do is append the letters
PIC to the variable ProgCode and then test to see if the file exists.
Here is one thought I have had so far but it does not work.
<dtml-if "_.getitem(ProgCode+'PIC')">
<IMG SRC=/Programs/(ProgCode+'PIC') ALIGN=RIGHT>
</dtml-if>
ethan mindlace fremen wrote:
> Terry Babbey wrote:
> >
> > Ethan,
> > Title and ID show me the title and id of the method I am currently in. I
> > want to display the title of a dtml document in the current folder I am in
> > but am not currently looking at.
> > I realize I am probably not using the jargon properly but this is how I
> > currently understand it with a lot of room for improvement.
> > Terry
>
> oh, OK. <dtml-var "something.title"> where something is the id of the
> document you want.
> if you have the id in a variable, then you need to do <dtml-var
> "_.getitem(variable).title"> where variable is the variable with the id.
>
> You can also do things like:
>
> <dtml-in "objectValues(['DTML Document'])">
> <p><dtml-var title>
> </dtml-in>
>
> to list all the DTML Documents in the folder.
>
> Hope that helps,
> --
> ethan mindlace fremen
> Zopatista Community Liason
> Abnigate I!
--
__________________________________________________________________
Terry Babbey
Technical Support Specialist
Lambton College, Sarnia, Ontario, Canada
__________________________________________________________________