Creating custon template object

Author Message

Jose Mourinho

Thursday 12 July 2007 4:40:21 am

Hello all
How can i create custom object with tempalte language?
somthing like this - {def $objects = fetch( 'content', 'ez')}

10x all

André R.

Thursday 12 July 2007 6:15:26 am

That would have to be something like:
{def $objects = fetch( 'my_something', 'ez')}

take a look in kernel/content/function_definition.php, basically you'll have to have a similar file in your own module extension (my_extension/modules/my_module/function_definition.php).

But you can of course return a object from a template operator as well.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

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 31 2025 06:04:04
Script start
Timing: Jan 31 2025 06:04:04
Module start 'layout'
Timing: Jan 31 2025 06:04:04
Module start 'content'
Timing: Jan 31 2025 06:04:04
Module end 'content'
Timing: Jan 31 2025 06:04:04
Script end

Main resources:

Total runtime0.0232 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 588.1328151.2109
Module start 'layout' 0.00550.0022 739.343836.6484
Module start 'content' 0.00770.0136 775.992290.1406
Module end 'content' 0.02140.0018 866.132829.9922
Script end 0.0232  896.1250 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002611.0430140.0002
Check MTime0.00124.9517140.0001
Mysql Total
Database connection0.00093.862510.0009
Mysqli_queries0.002410.215330.0008
Looping result0.00000.048210.0000
Template Total0.00146.010.0014
Template load0.00104.516910.0010
Template processing0.00031.450210.0003
Override
Cache load0.00073.183610.0007
General
dbfile0.005624.052180.0007
String conversion0.00000.033840.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs