Forums / Developer / customized admin edit interface for 1 class

customized admin edit interface for 1 class

Author Message

ludo thomas

Tuesday 29 November 2005 7:43:22 am

hi all.

I try to add a flash-map into admin interface only when i edit a perticular class (in my case named Spot).

I solved this problem by hacking edit.tpl and testing

{$object.class_name}

all is working and my map appear. but It's not a very elegant way.

Do someone have another idea?

<b>2nb question</b>
when I edit an existing object, I can know his parent by:

{$object.main_node.parent}

but when I create a new object, I just can have his ID ($object.id) or his class name ($object.class_name).

In my case I would know the Id of his parent.(for displaying one attribute which is located in the parent or grand-parent node of my new object.)

Ɓukasz Serwatka

Wednesday 30 November 2005 11:22:51 pm

but when I create a new object, I just can have his ID ($object.id) or his class name ($object.class_name).

You will have to fetch it in content/edit.tpl

{*For new creating object*}
{let parent_node=fetch( content, node, hash( node_id, $object.current.main_parent_node_id ) )}
{*Parent object*}
   {$parent_node.name}
{/let}

Hope it will help you.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog