template functions

Author Message

Marko Žmak

Monday 05 July 2004 3:39:09 pm

Is it possible to declare functions in EZ template. If you want to do the same thing in different places but with some different parameters.

Something like this:

{ function myfunction }
...
 (function declaration)
...
(end of function declaration)

...

{myfunction(1)}

...

{myfunction(7)}

If someone could help me out or point me to a section of the documentation about this.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Björn Dieding@xrow.de

Monday 05 July 2004 7:10:04 pm

well yes

operatopers are the things you are looking for...

look into the documentation and read the artivle on how to create a extension with an template operator

Looking for a new job? http://www.xrow.com/xrow-GmbH/Jobs
Looking for hosting? http://hostingezpublish.com
-----------------------------------------------------------------------------
GMT +01:00 Hannover, Germany
Web: http://www.xrow.com/

Bruce Morrison

Monday 05 July 2004 11:51:01 pm

depending on what you want to do template includes may be of use
http://ez.no/ez_publish/documentation/development/libraries/ez_template/functions/include

These can be passed parameters

Cheers
Bruce http://www.designit.com.au/

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Marko Žmak

Tuesday 06 July 2004 10:51:04 am

Yes, template includes ARE helpfull. Thanks.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

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

Main resources:

Total runtime0.0145 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.0053 588.1094151.1953
Module start 'layout' 0.00530.0024 739.304736.6172
Module start 'content' 0.00770.0053 775.921994.2500
Module end 'content' 0.01300.0015 870.171933.9922
Script end 0.0145  904.1641 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002517.1368140.0002
Check MTime0.00128.0950140.0001
Mysql Total
Database connection0.00085.800910.0008
Mysqli_queries0.002215.410530.0007
Looping result0.00000.068910.0000
Template Total0.00117.910.0011
Template load0.00096.209510.0009
Template processing0.00021.672210.0002
Override
Cache load0.00074.680110.0007
General
dbfile0.00117.523980.0001
String conversion0.00000.041040.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