Re: "include" Reference-Object?

Andreas Jung <[email protected]>
Newsgroups gmane.comp.web.zope.german
Organization ZOPYX Ltd & Co. KG
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 21.02.2009 17:03 Uhr, Hartmut Goebel wrote:
> Hallo
> 
> ich schon wieder ;-)
> 
> Wie kann ich ein referenziertes Objekt in meine Seite einbauen? Das
> referenzierte Objekt ist ein eigener Content-Type (spezieller Teaser),
> für das es auch eine View-Pagetemplate gibt (klar ;-) Diese Template hat
> wie üblich eine Makro-Definition.
> 
> An das referenzierte Objekt komme ich heran.
> 
> Ich möchte nun den Teaser in meiner Seite einbauen. Damit ich keine
> Code-Dopplung habe, möchte ich quasi sagen:
> 
>    rendere dich mal mit deinem Makro "main"

Main-Makro? nie gehört :-)


> 
> Mit ref/getReferenceObject/view bekommen auch den Seitenrahmen (im
> use-macro des Templates), den ich natürlich nicht will.

Falls 'obj' das referenzierte Objekt ist, dann kannst Du zumindest
Feldweise das Objekt rendern in der Form:

      <div tal:define="field python:obj.getField('weekly_publication')">
        <metal:macro use-macro="python: obj.widget(field.getName(),
mode='view', use_label=1)" />
      </div>

- -aj
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkmgJ7AACgkQCJIWIbr9KYwrFACguK2+NKrXYRUChsuZm3Yvlipt
eG0AnRljAcM/40avaGDHq5sxuOLCiqqF
=FenE
-----END PGP SIGNATURE-----



_______________________________________________
zope mailing list
[email protected]
https://mail.dzug.org/mailman/listinfo/zope
lists.vcf (text/x-vcard, 316 B)
begin:vcard
fn:Andreas Jung
n:Jung;Andreas
org:ZOPYX Ltd. & Co. KG
adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany
email;internet:[email protected]
title:CEO
tel;work:+49-7071-793376
tel;fax:+49-7071-7936840
tel;home:+49-7071-793257
x-mozilla-html:FALSE
url:www.zopyx.com
version:2.1
end:vcard
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.