just can't get 'let' and 'set' to work properly

Author Message

Ben Pirt

Friday 01 August 2003 7:07:30 am

I have the following code:

{section name=loop1 loop=3}
{let var1=2000}
{section name=loop2 loop=3}
{$loop1:var1}
{set $loop1:var1=1000}
{/section
{/let}
{/section}

which should output
2000 1000 1000
2000 1000 1000
2000 1000 1000

but actually outputs
2000 2000 2000
2000 2000 2000
2000 2000 2000

so it seems that the 'set' function is not working properly. How do I set this variable correctly? Anyone's helpl would be massively appreciated, this is driving me slowly mad :-)

All the best,
Ben

Paul Forsyth

Friday 01 August 2003 7:42:45 am

Have a read of this thread. I had the same problems.

http://ez.no/developer/ez_publish_3/forum/developer/using_letset_within_namespaces

paul

Ben Pirt

Friday 01 August 2003 8:34:21 am

Thanks for the reply - managed to get it working by stripping out a lot of the namespaces. Seems like the improvements to template namespaces need to happen quite urgently as the current set up just doesn't seem particularly practical or logical. I've been a programmer for years now, but this had me totally stumped :-)

oh well, on with the rest of the work now.

Cheers,
Ben

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 18 2025 19:26:52
Script start
Timing: Jan 18 2025 19:26:52
Module start 'layout'
Timing: Jan 18 2025 19:26:52
Module start 'content'
Timing: Jan 18 2025 19:26:52
Module end 'content'
Timing: Jan 18 2025 19:26:52
Script end

Main resources:

Total runtime0.6139 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.0065 589.1641152.6406
Module start 'layout' 0.00650.0034 741.804739.4766
Module start 'content' 0.00990.6024 781.2813473.3047
Module end 'content' 0.61230.0015 1,254.58598.1250
Script end 0.6138  1,262.7109 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.5490160.0002
Check MTime0.00130.2178160.0001
Mysql Total
Database connection0.00130.212410.0013
Mysqli_queries0.566292.2313570.0099
Looping result0.00050.0748550.0000
Template Total0.586295.520.2931
Template load0.00220.353320.0011
Template processing0.584095.134620.2920
Template load and register function0.00020.031010.0002
states
state_id_array0.00070.118410.0007
state_identifier_array0.00070.118020.0004
Override
Cache load0.00170.2820320.0001
Sytem overhead
Fetch class attribute can translate value0.00060.102020.0003
Fetch class attribute name0.00110.183430.0004
XML
Image XML parsing0.00020.040720.0001
class_abstraction
Instantiating content class attribute0.00000.001830.0000
General
dbfile0.00080.1225100.0001
String conversion0.00000.001540.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
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 18
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs