[Zope] Variable File Include
Jason Alexander
jason-alexander@home.com
Sun, 1 Jul 2001 18:31:19 -0500
Ah, sorry... I'm actually using zPoPy, and, yes, the userpluginposition is
actually in the database. I'm doing a dtml-let beforehand, assigning the
database result to the plugins var.
In terms of results, it simple prints out the name of the file name, rather
then including the file onto the page.
-Jason
----- Original Message -----
From: "Jim Penny" <jpenny@universal-fasteners.com>
To: "Jason Alexander" <jason-alexander@home.com>
Sent: Sunday, July 01, 2001 5:51 PM
Subject: Re: [Zope] Variable File Include
> On Sun, Jul 01, 2001 at 05:40:23PM -0500, Jason Alexander wrote:
> > Hello all,
> >
> >
> > I'm attempting to do variable file includes, where the actual file name
is
> > held in a column in a database, but I am having a few issues. I'm
attempting
> > to do:
> >
> > <dtml-in plugins>
> > <dtml-if expr="userpluginposition == 3">
> > <dtml-var pluginfilename>
> > </dtml-if>
> > </dtml-in>
>
> I am assuming that you have userpluginposition as a column of
> the database.
>
> You haven't said what DA you are working with, but in a few cases,
> the DA loses type and converst everything to string.
>
> It is safer to do an explicit conversion.
>
> <dtml-in plugins>
> <dtml-if expr="_.int(userpluginposition) == 3">
> <dtml-var pluginfilename>
> </dtml-if>
> </dtml-in>
>
> >
> > But, with no luck.
> >
> > Is there another way to do? Any help or direction would be greatly
> > appreciated.
> >
> > Thanks!
> > -Jason
> >
> >
> > _______________________________________________
> > 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 )
> >