is it a bug?

Author Message

Marko Žmak

Thursday 03 February 2005 4:29:18 am

This code in my template:

{section show=$title_link}
 {section show=$title_url}
 Text
 {/section}
{/section}

outputs: Text

and this code:

{section show=and($title_link,$title_url)}
 Text
{/section}

Doesn't output anything. $title_link is a boolean, and $title_url is a string. Is this a bug ro am I doing something wrong?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Łukasz Serwatka

Thursday 03 February 2005 5:00:38 am

I didn`t test it but should work.

{section show=eq($title_link, true())}
 {section show=$title_url.has_content}
 Text
 {/section}
{/section}

If this $title_url.has_content didn`t work try ne($title_url, '')

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Balazs Halasy

Thursday 03 February 2005 7:48:01 am

Luke,

Can you test this pelase? Report it if you find the behavior suspicious. Thanks..

Allman

Łukasz Serwatka

Thursday 03 February 2005 8:05:33 am

Works fine...

{let
      title_link=true()
      title_url='something'}

{section show=and($title_link,$title_url)}
 Text
{/section}

{/let}

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Marko Žmak

Thursday 03 February 2005 10:31:03 am

Here's a detailed version of the problem. I'll repeat the codes.

1st code:

{section show=$title_link}
 {section show=$title_url}
 Text
 {/section}
{/section}

2nd code:

{section show=and($title_link,$title_url)}
 Text
{/section}

As far as I know this two codes should return the same values regardless of what are the values of $title_link and $title_url variables. Because that's what the "and()" operator does. Am I right?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

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 30 2025 21:45:56
Script start
Timing: Jan 30 2025 21:45:56
Module start 'layout'
Timing: Jan 30 2025 21:45:56
Module start 'content'
Timing: Jan 30 2025 21:45:57
Module end 'content'
Timing: Jan 30 2025 21:45:57
Script end

Main resources:

Total runtime1.2630 sec
Peak memory usage8,192.0000 KB
Database Queries65

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0042 588.0078151.1953
Module start 'layout' 0.00420.0038 739.2031220.6484
Module start 'content' 0.00791.2541 959.85164,525.7734
Module end 'content' 1.26210.0009 5,485.625015.8906
Script end 1.2630  5,501.5156 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.2702160.0002
Check MTime0.00130.1010160.0001
Mysql Total
Database connection0.00070.055610.0007
Mysqli_queries1.164092.1555650.0179
Looping result0.00070.0558630.0000
Template Total1.210295.820.6051
Template load0.00230.183120.0012
Template processing1.207895.630220.6039
Template load and register function0.00130.100610.0013
states
state_id_array0.00130.102910.0013
state_identifier_array0.00170.130920.0008
Override
Cache load0.00200.1559320.0001
Sytem overhead
Fetch class attribute can translate value0.00220.171330.0007
Fetch class attribute name0.00240.186780.0003
XML
Image XML parsing0.00190.152030.0006
class_abstraction
Instantiating content class attribute0.00000.0017100.0000
General
dbfile0.00210.1666320.0001
String conversion0.00000.000540.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/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
10content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
6content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 28
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs