Parent's name in object name pattern ?

Author Message

Alexandre Abric

Monday 21 November 2005 1:23:46 am

Hi,

In the classes definition, is it possible to add the parent's name in the object name pattern ?

For instance, I have the following structure :
- Product1
- - Option1
- - Option2
- Product2
- - Option1
- - Option2

Instead, I would like the options to have automatically the following names:
- Product1
- - Product1 Option1
- - Product1 Option2
- Product2
- - Product2 Option1
- - Product2 Option2

Is this possible out of the box ? Or should I write my own extension/hack ?

Perhaps a workaround for this would be to have an automatically "parent node" datatype on each Option object ...

Thanks

Ɓukasz Serwatka

Monday 21 November 2005 1:37:30 am

This is not possible.

You can use in template:

{$node.parent.name} {$node.name}

Output will be:
Product1 Option1

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

Alexandre Abric

Monday 21 November 2005 2:55:13 am

OK thanks

I'll try to find a workaround, because I need to display it also in the javascript tree of the admin itnerface.

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 19 2025 00:30:03
Script start
Timing: Jan 19 2025 00:30:03
Module start 'layout'
Timing: Jan 19 2025 00:30:03
Module start 'content'
Timing: Jan 19 2025 00:30:04
Module end 'content'
Timing: Jan 19 2025 00:30:04
Script end

Main resources:

Total runtime0.7862 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0070 588.0313152.6406
Module start 'layout' 0.00700.0057 740.671939.4766
Module start 'content' 0.01270.7716 780.1484537.7344
Module end 'content' 0.78430.0019 1,317.88288.1406
Script end 0.7862  1,326.0234 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.5173160.0003
Check MTime0.00150.1963160.0001
Mysql Total
Database connection0.00090.120710.0009
Mysqli_queries0.724092.0911570.0127
Looping result0.00060.0788550.0000
Template Total0.740694.220.3703
Template load0.00210.262220.0010
Template processing0.738593.935020.3693
Template load and register function0.00020.030010.0002
states
state_id_array0.00120.149310.0012
state_identifier_array0.00140.181520.0007
Override
Cache load0.00160.2031320.0000
Sytem overhead
Fetch class attribute can translate value0.00070.083120.0003
Fetch class attribute name0.00160.203640.0004
XML
Image XML parsing0.00070.089820.0004
class_abstraction
Instantiating content class attribute0.00000.001840.0000
General
dbfile0.00090.1150180.0001
String conversion0.00000.001640.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
3content/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
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 16
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs