Timeline and blocks

Author Message

Anja Lundin

Monday 18 May 2009 7:07:06 am

Hi!
I've been working to solve a problem we have with the timeline for some time now and today I finally found out what the trouble is.

The problem was that every time we tried to use the timeline we got the javascript error:
YAHOO.util.Dom.get( blockID ).innerHTML is null

First of all, in the zone/ourzonetemplate.tpl I noticed that the

<div id="address-{$block.zone_id}-{$block.id}">

was removed, and it must not be removed if we want to use the timeline. The timeline uses the id of the div to recognise the blocks.

Second: we have a dynamic block which is shown sometimes and sometimes not. The timeline wanted to fetch the id for our dynamic block everytime, even if there was no content inside the block. I have now removed the if-statement around the div

{if or( $block.valid_nodes|count(), 
    and( is_set( $block.custom_attributes), $block.custom_attributes|count() ), 
    and( eq( ezini( $block.type, 'ManualAddingOfItems', 'block.ini' ), 'disabled' ), ezini_hasvariable( $block.type, 'FetchClass', 'block.ini' )|not ) )}
    <div id="address-{$block.zone_id}-{$block.id}">
    {block_view_gui block=$block}
    </div>
{else}
    {skip}
{/if}

and I put the code in the template without any if-statements.

My question now is: Can there be any unwanted consequences if we don't have the if-statement in the zone template? What is the idea of this if-statement?

Thanks in advance!

Anja Lundin, Novitell AB, Sweden

------------------------------------
Anja Lundin
Developer, Novitell AB
Sweden

www.novitell.se

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

Main resources:

Total runtime0.1274 sec
Peak memory usage4,096.0000 KB
Database Queries48

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0077 587.9375152.6250
Module start 'layout' 0.00770.0057 740.562539.4453
Module start 'content' 0.01340.1127 780.0078473.4844
Module end 'content' 0.12610.0012 1,253.49228.1641
Script end 0.1274  1,261.6563 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00352.7525160.0002
Check MTime0.00141.1062160.0001
Mysql Total
Database connection0.00120.944510.0012
Mysqli_queries0.081563.9587480.0017
Looping result0.00060.4327460.0000
Template Total0.088369.320.0441
Template load0.00191.465020.0009
Template processing0.086467.818420.0432
Template load and register function0.00020.131010.0002
states
state_id_array0.00070.577010.0007
state_identifier_array0.00070.569920.0004
Override
Cache load0.00151.2029170.0001
Sytem overhead
Fetch class attribute can translate value0.00070.536210.0007
Fetch class attribute name0.00050.372320.0002
XML
Image XML parsing0.00090.733310.0009
class_abstraction
Instantiating content class attribute0.00000.003020.0000
General
dbfile0.00100.7957160.0001
String conversion0.00000.015040.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
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/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
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/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: 12
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs