[Zope3-Users] Accessing sub objects view class?
Frank Burkhardt
fbo2 at gmx.net
Thu Mar 16 11:26:23 EST 2006
On Wed, Mar 15, 2006 at 10:22:02AM -0800, Mats Nordgren wrote:
> I'm trying to figure out how to access a sub objects view class.
>
>
>
> 1. <div metal:fill-slot="body">
>
> 2. <h4 tal:content="context/title">Title</h4>
>
> 3. <div tal:content="structure view/renderDescription">Description</div>
>
> 4. <div tal:define="sections view/getSections">
>
> 5. <div tal:repeat="item sections">
>
> 6. <div metal:use-macro="item/<at><at>view.html/sectionmacro">
>
> 7. <span metal:fill-slot="title"><span tal:content="item/title"
> /></span>
>
> 8. <span metal:fill-slot="description"><span
> tal:content="item/description" /></span>
>
> 9. </div>
>
> 10. </div>
>
> 11. </div>
>
> 12.</div>
>
>
>
> I'm trying to format the description of subobject 'item' on line 8 with its
> renderDescription function, just like parent object on line 3, but can't
> seem to figure out how. Perhaps I'm going about it completely wrong. Any
> help appreciated.
You need to specify the view, you want to use on item - e.g. 'view.html'.
Try this:
<span tal:content="item/@@view.html/renderDescription">
Regards,
Frank
More information about the Zope3-users
mailing list