Forums / Setup & design / Examples from the book: Ez publish basics

Examples from the book: Ez publish basics

Author Message

Ciaran McGrath

Friday 07 July 2006 8:06:30 am

Hi,

I've been trying to use one of the examples from the new book but I'm getting an error when using the simple menu example from page 138

Here's the line of code:

{def $elements = fetch( content, list, hash( parent_node_id, 2, class_filter_type, include, class_filter_array, array( 'folder' ) )}

And here's the error message I get in the debug mode

parser error @ design/mcg/templates/pagelayout.tpl:22
($) expected at [fetch( content, list, hash( parent_node_id, 2, class_filter_type, include, class_filter_array, array( 'folder' 
) )]

Please help. I'm totally confused by this system.!

André R.

Friday 07 July 2006 8:14:52 am

Count number of "(", then count number of ")"

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Ciaran McGrath

Friday 07 July 2006 8:38:29 am

I really should have spotted that!

There are a quite a few errors in just that one example.

It's going to be a long night :-(

Thanks for your help

Jennifer Zickerman

Thursday 24 August 2006 4:43:06 pm

Hello. Thanks for pointing out these errors. I've created an Errata page for the book at http://ez.no/products/books/ez_publish_basics/ez_publish_basics_errata and posted a corrected version of the code snippet.

eZ debug

Timing: Jan 18 2025 11:18:59
Script start
Timing: Jan 18 2025 11:18:59
Module start 'content'
Timing: Jan 18 2025 11:18:59
Module end 'content'
Timing: Jan 18 2025 11:18:59
Script end

Main resources:

Total runtime0.1840 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0068 594.0078180.8125
Module start 'content' 0.00680.0067 774.820393.9609
Module end 'content' 0.01350.1704 868.7813522.6250
Script end 0.1839  1,391.4063 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00392.0957200.0002
Check MTime0.00150.8307200.0001
Mysql Total
Database connection0.00110.574610.0011
Mysqli_queries0.135173.45331410.0010
Looping result0.00140.75811390.0000
Template Total0.169892.310.1698
Template load0.00100.537010.0010
Template processing0.168891.758310.1688
Override
Cache load0.00070.363610.0007
Sytem overhead
Fetch class attribute can translate value0.00090.513210.0009
XML
Image XML parsing0.00030.154310.0003
General
dbfile0.00321.7636200.0002
String conversion0.00000.004330.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0003 secs