Trouble with navigation

Author Message

John Petrello

Friday 07 January 2011 2:48:09 pm

To start off, I am totally new to eZPublish and am just using it because a client is requesting changes to their homepage.

Here is the code I have thus far:

<li>{def $womens = fetch('content', 'node', hash('node_id', 10459))}<a href="{$womens.object.url_alias|ezurl}">Womens</a></li>

Basically, I am just trying to get the path to a certain node, which in this case is the Womens clothing section of a site. I have the URL alias field filled out for that node, but I cant seem to retrieve it. Does everything look alright?

Thanks!

Edi Modrić

Friday 07 January 2011 3:44:08 pm

Hi Jonh,

your <a> tag should look like this:

<a href={$womens.url_alias|ezurl}>Womens</a></li>

That is, no quotes as ezurl operator generates them, and no "object" because url_alias property exists on node, not object.

eZ Publish certified developer

http://ez.no/certification/verify/350658

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 05:21:36
Script start
Timing: Jan 18 2025 05:21:36
Module start 'layout'
Timing: Jan 18 2025 05:21:36
Module start 'content'
Timing: Jan 18 2025 05:21:37
Module end 'content'
Timing: Jan 18 2025 05:21:37
Script end

Main resources:

Total runtime0.7793 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0050 587.9063152.6250
Module start 'layout' 0.00500.0024 740.531339.4531
Module start 'content' 0.00740.7701 779.9844521.9531
Module end 'content' 0.77750.0017 1,301.93758.3281
Script end 0.7792  1,310.2656 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.4292160.0002
Check MTime0.00130.1714160.0001
Mysql Total
Database connection0.00060.074310.0006
Mysqli_queries0.738694.7789540.0137
Looping result0.00050.0619520.0000
Template Total0.755196.920.3775
Template load0.00240.308720.0012
Template processing0.752796.586420.3763
Template load and register function0.00010.016810.0001
states
state_id_array0.00070.091110.0007
state_identifier_array0.00130.170020.0007
Override
Cache load0.00160.2115140.0001
Sytem overhead
Fetch class attribute can translate value0.00070.090220.0004
Fetch class attribute name0.00120.158030.0004
XML
Image XML parsing0.00070.092320.0004
class_abstraction
Instantiating content class attribute0.00000.001530.0000
General
dbfile0.00080.1045160.0001
String conversion0.00000.001040.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
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.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: 9
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs