Improved template syntax - spec-14 (Completed)

Author Message

Andrew Vorobyov

Thursday 02 June 2005 3:13:41 am

Improved template syntax - spec-14 (Completed)
http://ez.no/community/developer/specs/improved_template_syntax

Is it already implemented in 3.6.0?

Cause this is not working for me..

{set $i=10}
i: {$i}

Hans Melis

Thursday 02 June 2005 3:31:15 am

Hi,

That spec has been implemented in 3.6.0, but your usage of the set function is wrong. <b>set</b> can only be used to re-initialise existing variables, not to define new ones.

With regards to the new syntax, the correct way would be:

{def $i=5}
i: {$i}
{set $i=10}
i: {$i}

An {undef} at the end would clean up $i, but this will also happen automatically at the end of the execution of that template.

Hans
http://blog.hansmelis.be

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

Main resources:

Total runtime0.0322 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.0051 588.2656151.2266
Module start 'layout' 0.00510.0025 739.492236.6797
Module start 'content' 0.00760.0229 776.171990.3125
Module end 'content' 0.03050.0017 866.484429.9922
Script end 0.0322  896.4766 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00288.6030140.0002
Check MTime0.00123.8051140.0001
Mysql Total
Database connection0.00061.944310.0006
Mysqli_queries0.00257.749230.0008
Looping result0.00000.037010.0000
Template Total0.00123.810.0012
Template load0.00102.952010.0010
Template processing0.00030.828010.0003
Override
Cache load0.00072.092910.0007
General
dbfile0.009730.162180.0012
String conversion0.00000.018540.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