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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 20 2025 20:13:39
Script start
Timing: Jan 20 2025 20:13:39
Module start 'layout'
Timing: Jan 20 2025 20:13:39
Module start 'content'
Timing: Jan 20 2025 20:13:40
Module end 'content'
Timing: Jan 20 2025 20:13:40
Script end

Main resources:

Total runtime1.4564 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 588.0469151.2266
Module start 'layout' 0.00540.0037 739.273436.6797
Module start 'content' 0.00911.4461 775.9531559.9297
Module end 'content' 1.45520.0011 1,335.88288.1250
Script end 1.4563  1,344.0078 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00390.2699160.0002
Check MTime0.00120.0857160.0001
Mysql Total
Database connection0.00080.051610.0008
Mysqli_queries1.405896.5257540.0260
Looping result0.00080.0523520.0000
Template Total1.404796.520.7024
Template load0.00190.130520.0010
Template processing1.402896.322520.7014
Template load and register function0.00020.010910.0002
states
state_id_array0.00250.168610.0025
state_identifier_array0.00180.123720.0009
Override
Cache load0.00160.1068210.0001
Sytem overhead
Fetch class attribute can translate value0.00070.049120.0004
Fetch class attribute name0.00180.120640.0004
XML
Image XML parsing0.00340.231420.0017
class_abstraction
Instantiating content class attribute0.00000.000640.0000
General
dbfile0.00270.1828240.0001
String conversion0.00000.000640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 17
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs