Forums / Setup & design / Parent's name in object name pattern ?

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.

eZ debug

Timing: Jan 18 2025 21:14:30
Script start
Timing: Jan 18 2025 21:14:30
Module start 'content'
Timing: Jan 18 2025 21:14:31
Module end 'content'
Timing: Jan 18 2025 21:14:31
Script end

Main resources:

Total runtime0.8218 sec
Peak memory usage4,096.0000 KB
Database Queries58

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0076 588.9453180.8281
Module start 'content' 0.00760.8099 769.7734542.8281
Module end 'content' 0.81750.0043 1,312.601642.0859
Script end 0.8218  1,354.6875 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00290.3565140.0002
Check MTime0.00130.1560140.0001
Mysql Total
Database connection0.00080.092110.0008
Mysqli_queries0.777594.6033580.0134
Looping result0.00070.0891560.0000
Template Total0.779094.820.3895
Template load0.00210.254020.0010
Template processing0.776994.530320.3884
Template load and register function0.00020.018510.0002
states
state_id_array0.00130.156110.0013
state_identifier_array0.00190.236320.0010
Override
Cache load0.00170.2041320.0001
Sytem overhead
Fetch class attribute can translate value0.00060.077320.0003
Fetch class attribute name0.00140.165040.0003
XML
Image XML parsing0.00080.092520.0004
class_abstraction
Instantiating content class attribute0.00000.001740.0000
General
dbfile0.00110.1294200.0001
String conversion0.00000.001030.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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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