Setting a variable with let

Author Message

Paul Carpenter

Saturday 03 April 2004 9:02:21 am

I'm sure the answer to this is simple but I can't seem to get it. I'm trying to set a variable that holds the date 14 days from current date and then pass it as a default value to attribute_edit_gui. In my template I've got:

{let date=sum(currentdate(),1209600)}
{$date}
{attribute_edit_gui attribute_base=$attribute_base attribute=$ContentObjectAttribute:item value=$date}
{/let}

debug returns: Unknown template variable 'date' in namespace ''

What am I doing wrong?

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 19 2025 01:16:29
Script start
Timing: Jan 19 2025 01:16:29
Module start 'layout'
Timing: Jan 19 2025 01:16:29
Module start 'content'
Timing: Jan 19 2025 01:16:29
Module end 'content'
Timing: Jan 19 2025 01:16:29
Script end

Main resources:

Total runtime0.0272 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.0083 589.1563152.6250
Module start 'layout' 0.00830.0042 741.781339.4453
Module start 'content' 0.01260.0130 781.226685.2109
Module end 'content' 0.02560.0016 866.437530.3047
Script end 0.0272  896.7422 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002910.7392140.0002
Check MTime0.00124.2960140.0001
Mysql Total
Database connection0.00155.580110.0015
Mysqli_queries0.003814.128430.0013
Looping result0.00000.063010.0000
Template Total0.00134.810.0013
Template load0.00072.504310.0007
Template processing0.00062.265310.0006
Override
Cache load0.00051.718210.0005
General
dbfile0.005520.253080.0007
String conversion0.00000.058640.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