[Zope] Re: How to convert string to object?
Josef Meile
josef.meile@imes.mavt.ethz.ch
Thu, 6 Mar 2003 19:43:18 +0100
This is a multi-part message in MIME format.
------=_NextPart_000_0017_01C2E418.A321E210
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
> I tried do following in index_html:
>=20
> <dtml-var obj>
>=20
> But this echoes only plain text ('path.to.object.file') and not the=20
> object's content. I need to find some way how to convert this string =
to=20
> object, so Zope (or Python) can understand it as an object and display =
its=20
> content. Is there some way?
You could try:
<dtml-var "REQUEST.resolve_url(obj)">
Regards,
Josef
------=_NextPart_000_0017_01C2E418.A321E210
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1141" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>> I tried do following in =
index_html:<BR>>=20
<BR>> <dtml-var obj><BR>> <BR>> But this echoes only =
plain text=20
('path.to.object.file') and not the <BR>> object's content. I need to =
find=20
some way how to convert this string to <BR>> object, so Zope (or =
Python) can=20
understand it as an object and display its <BR>> content. Is there =
some=20
way?<BR>You could try:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><dtml-var=20
"REQUEST.resolve_url(obj)"></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Regards,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Josef</FONT></DIV></BODY></HTML>
------=_NextPart_000_0017_01C2E418.A321E210--