{switch} {case} will not Work!!!?!?!

Author Message

Douglas Johnson

Wednesday 23 July 2003 2:22:18 pm

{let ......}
{section}
{switch name=navcheck match=$node.name}
{case match!="Metal-Fab Inc."}
................ statements .....
{/case}
{/switch}
{/section}
{/let}

Alex Jones

Wednesday 23 July 2003 2:27:42 pm

Douglas, {switch} {case} should work. Could you post some specifics as to the problem you are encountering?

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Douglas Johnson

Wednesday 23 July 2003 2:32:38 pm

Thanks Alex.

I think it has something to do with either the "!=" or the "match=$node.name". When I have:

{switch name=navcheck match="99"}

{case match!="22"}

It works! But not with the variable $node.name???? Any ideas.

Douglas Johnson

Wednesday 23 July 2003 2:42:53 pm

OK, the problem is with the "!=". Is this a valid operator? If not, what do I use for not equal? I have tried ne and <> but niether work???

Kjerand Pedersen

Wednesday 23 July 2003 3:00:23 pm

To use the 'ne' operator, to this:

{section show=$node.name|ne("Home")}
...statements...
{/section}

Or use Switch as in my reply to your other post.

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

Main resources:

Total runtime0.7662 sec
Peak memory usage4,096.0000 KB
Database Queries65

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0061 587.9141152.6250
Module start 'layout' 0.00610.0023 740.539139.4609
Module start 'content' 0.00840.7567 780.0000580.4609
Module end 'content' 0.76510.0011 1,360.460912.1563
Script end 0.7662  1,372.6172 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.4552160.0002
Check MTime0.00150.1939160.0001
Mysql Total
Database connection0.00110.147210.0011
Mysqli_queries0.717793.6677650.0110
Looping result0.00070.0933630.0000
Template Total0.739196.520.3696
Template load0.00280.365820.0014
Template processing0.736396.093620.3681
Template load and register function0.00010.016610.0001
states
state_id_array0.00130.165610.0013
state_identifier_array0.00130.172320.0007
Override
Cache load0.00240.3185300.0001
Sytem overhead
Fetch class attribute can translate value0.00080.108230.0003
Fetch class attribute name0.00100.132560.0002
XML
Image XML parsing0.00070.096630.0002
class_abstraction
Instantiating content class attribute0.00000.001460.0000
General
dbfile0.00080.0992160.0000
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
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 16
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs