url alias problem with main_node_id

Author Message

bisk

Wednesday 19 May 2004 3:33:47 am

I have some related object's which url's get build with this code:

<a href={concat( '/content/view/full/', $object.main_node_id )|ezurl}>

Now I'm trying to change it to friendly urls with url_alias and ezroot, but how do i change the main_node_id into a working url alias?

-------------------------------
http://www.kookfijn.nl & http://www.magento.be

akiL Mussa

Wednesday 19 May 2004 4:00:26 am

try this:

<a href={$node.url_alias|ezurl}>

bisk

Wednesday 19 May 2004 4:19:12 am

thanks for your reply, but that doesn't work. It just ends up with an empty <a href="">.

I don't have any problems with getting friendly url's to work in general, just only with these related objects.

-------------------------------
http://www.kookfijn.nl & http://www.magento.be

Patrick Woods

Wednesday 19 May 2004 6:39:12 am

The only way I was able to do get the main_node_id url_alias was to fetch the main_node, which seems like redundant work.

Maybe its the way I have things setup. I have a News folder that gets fetched as my home page. I add that location to anything that I want to appear as news but I want it to display the main location as the location of the node. I fetch the main_node information and use that.

Seems silly to have to do two fetches, but it seems that the only main_node information that is passed with the current node is the id.

--
www.hakjoon.com

bisk

Wednesday 19 May 2004 7:47:56 am

thanks, i've figured it out:

<a href={$object.main_node.url_alias|ezroot}>

that works :)

-------------------------------
http://www.kookfijn.nl & http://www.magento.be

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 31 2025 05:31:55
Script start
Timing: Jan 31 2025 05:31:55
Module start 'layout'
Timing: Jan 31 2025 05:31:55
Module start 'content'
Timing: Jan 31 2025 05:31:57
Module end 'content'
Timing: Jan 31 2025 05:31:57
Script end

Main resources:

Total runtime1.4476 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.0072 588.2500151.2266
Module start 'layout' 0.00720.0028 739.476636.6641
Module start 'content' 0.01001.4365 776.1406981.9609
Module end 'content' 1.44650.0010 1,758.101611.8438
Script end 1.4475  1,769.9453 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.2300160.0002
Check MTime0.00160.1077160.0001
Mysql Total
Database connection0.00060.042710.0006
Mysqli_queries1.386795.7973650.0213
Looping result0.00070.0514630.0000
Template Total1.403096.920.7015
Template load0.00200.138720.0010
Template processing1.401096.782820.7005
Template load and register function0.00210.142310.0021
states
state_id_array0.00230.156910.0023
state_identifier_array0.00290.200620.0015
Override
Cache load0.00170.1187210.0001
Sytem overhead
Fetch class attribute can translate value0.00120.080830.0004
Fetch class attribute name0.00380.262860.0006
XML
Image XML parsing0.00240.165130.0008
class_abstraction
Instantiating content class attribute0.00000.001260.0000
General
dbfile0.00370.2565160.0002
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/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/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: 18
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs