sergey podlesnyi
|
Tuesday 14 January 2003 4:07:13 am
Hi Xavier,
I found a solution to display related objects - go to
design/user/override/templates/content/view and you will see "embed" templates there. Put your own template embed_class_5.tpl where 5=id of related object class. I used line_class_5.tpl copy to start with, and it worked. How do you add related objects to master object? In my installation data entry does not work - I select an object that I want to attach as related, but when press "Send for publishing" it says "Input does not validate". I had to use XML-text data field instead of related object, and paste <object> tag there (embed_ template works for this solution). Cheers! Sergey
> Hi all,
>
> I've installed and discovered the lastest beta during the
> Xmas holidays. I'm amazed how clever it is. I remembered all
> the discussion we've had on the dev mailing list since the
> 2.x days... and you made our dreams come true !
>
> I've no doubt anymore that santa klaus lives in norvay, and
> he belongs to the ez crew ;)
>
> Ok, back to my template problem :
>
> I'd like to customize the full.tpl view for a specific
> class, display its attributes and its related objects
> (therefore creating a
> /design/xxx/templates/node/view/full_class_nn.tpl )
>
> In the template file, how do I access related objects ?
>
> I've tried several attributes, like
> {$node.object.data_map.related_contetobject_array} on a
> sectoin loop, but I haven't managed to get the related
> objects.
>
> Are they already loaded somewhere in the $node attribute ?
>
> How to list all the attributes on this $node element ?
>
> Should I try to let related= fetch ('content', 'list', ???)
> them ?
>
> Thanks in advance for any hint, I'm afraid a need a hand
> after a sleepness night...
>
> Xavier
>
> P.S. Is is possible to add an extra param on the url to > force ez to rebuild the cache ?
|