Problems with Set and namespaces

Author Message

Kjerand Pedersen

Saturday 19 July 2003 8:04:46 am

Hi,

Can anyone tell me why this isn't working? :-|

{let today=0 daystamp=currentdate()}
{section name=Weeks loop=5}
{set #:today=$daystamp}
{$myvariable}
{/section}
{/let}

Debug:
Error: eZTemplate:parser error @ design/user/override/templates/node_termin.tpl:12[4] Jul 19 2003 16:38:27
Invalid parameter characters in function 'set': '#:today=$daystamp'

As you see from the code, I'm trying to assign a value to the variable 'today' in the root namespace.

I also have some problems with logical operators like:

{section show=gt(10,5)}
code
{/section}

For some reason, this statement doesn't validate. The weird thing is that if i replace 'gt' with 'lt', the statement validates regardless of the parameters given. The 'eq' operator seems to work fine though.

Any clues? Anyone?

I'm running Versjon 3.1-1 (3.1) SVN revision 2703 on a non-virtual host.

Kjerand Pedersen

Saturday 19 July 2003 3:38:14 pm

Just discovered that if I write something like:

{section show=$variable|gt($variable2)}

then it works...and I think I understand why. 'eq' and 'ne' checks all given parameters to see if they match or differ, while the 'lt', 'gt' etc. takes _one_ parameter and checks it with the input value. That's why you can use the syntax eq(parameter1, parameter2, ...) and not lt(parameter1, parameter2, ...), right?

Suppose I'm a bit slow ;-)

Still, got problems with the {set #:variable=$value} syntax though. If I leave the loop-sections unnamed, it works, but I would rather do it "the right way".

Thanks for any help,

Kjerand...

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

Main resources:

Total runtime0.7693 sec
Peak memory usage4,096.0000 KB
Database Queries52

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0074 589.3828152.6250
Module start 'layout' 0.00750.0033 742.007839.4453
Module start 'content' 0.01070.7570 781.4531430.0000
Module end 'content' 0.76770.0015 1,211.45318.1563
Script end 0.7693  1,219.6094 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.4320160.0002
Check MTime0.00140.1831160.0001
Mysql Total
Database connection0.00110.136710.0011
Mysqli_queries0.715593.0117520.0138
Looping result0.00050.0646500.0000
Template Total0.724594.220.3622
Template load0.00230.295220.0011
Template processing0.722293.877120.3611
Template load and register function0.00020.026510.0002
states
state_id_array0.00110.146910.0011
state_identifier_array0.00080.100820.0004
Override
Cache load0.00190.2484320.0001
Sytem overhead
Fetch class attribute can translate value0.00050.071110.0005
Fetch class attribute name0.00160.203320.0008
XML
Image XML parsing0.00010.016010.0001
class_abstraction
Instantiating content class attribute0.00000.000920.0000
General
dbfile0.00060.0830100.0001
String conversion0.00000.001140.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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/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: 14
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs