Fwd: [ZPT] Newbie: Calling REQUEST.set from zpt ?

Godefroid Chapelle gotcha@swing.be
Mon, 28 Jan 2002 18:11:22 +0100


>From: Gitte Wange <gitte@mmmanager.org>
>To: zpt@zope.org
>X-Mailer: Evolution/1.0.1
>Subject: [ZPT] Newbie: Calling REQUEST.set from zpt ?
>Sender: zpt-admin@zope.org
>X-BeenThere: zpt@zope.org
>X-Mailman-Version: 2.0.8 (101270)
>List-Help: <mailto:zpt-request@zope.org?subject=help>
>List-Post: <mailto:zpt@zope.org>
>List-Subscribe: <http://lists.zope.org/mailman/listinfo/zpt>,
>         <mailto:zpt-request@zope.org?subject=subscribe>
>List-Id: Zope Presentation Templates <zpt.zope.org>
>List-Unsubscribe: <http://lists.zope.org/mailman/listinfo/zpt>,
>         <mailto:zpt-request@zope.org?subject=unsubscribe>
>List-Archive: <http://lists.zope.org/pipermail/zpt/>
>Date: 28 Jan 2002 16:56:40 +0100
>X-MDA: Freemail-1.2
>
>
>Hello,
>
>I'm new into zpt but it looks like a very nice way in designing skins
>for Zope.
>I have understood the basics and have already created a new skin for
>CMF.
>Now I have run into a small problem I can't seem to read about in any of
>the howto's I have been reading:
>How do I call REQUEST.set() ?
>The problem is this:
>I have a pt which needs to display some data from the object in context.
>But this object can be of 2 metatypes; either it's a Clip or a
>Masterfile.
>In dtml I would do somthing like:
><dtml-if "this().meta_type == 'Media Manager Master File'">
>  <dtml-call "REQUEST.set('fileobj', this()">
><dtml-else>
>  <dtml-call "REQUEST.set('fileobj', this().getMasterfile())">
></dtml-if>
><table>
>  <tr>
>   <td><dtml-var "fileobj.title"></td>
>  </tr>
></table>
>
>But how to do this in ZPT ???
>
>TIA,
>Gitte Wange
>
>
>
>_______________________________________________
>ZPT mailing list
>ZPT@zope.org
>http://lists.zope.org/mailman/listinfo/zpt

--

Godefroid Chapelle

BubbleNet sprl
rue Victor Horta, 18 / 202
1348 Louvain-la-Neuve
Belgium

Tel + 32 (10) 459901
Mob + 32 (477) 363942

TVA 467 093 008
RC Niv 49849