Forums / Setup & design / url alias problem with main_node_id

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

eZ debug

Timing: Jan 18 2025 19:20:42
Script start
Timing: Jan 18 2025 19:20:42
Module start 'content'
Timing: Jan 18 2025 19:20:43
Module end 'content'
Timing: Jan 18 2025 19:20:44
Script end

Main resources:

Total runtime1.6645 sec
Peak memory usage4,096.0000 KB
Database Queries202

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0111 587.8125180.8281
Module start 'content' 0.01111.4395 768.6406591.2969
Module end 'content' 1.45060.2138 1,359.9375337.3984
Script end 1.6644  1,697.3359 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00420.2503210.0002
Check MTime0.00160.0954210.0001
Mysql Total
Database connection0.00300.182310.0030
Mysqli_queries1.579894.91382020.0078
Looping result0.00300.17972000.0000
Template Total1.621297.420.8106
Template load0.00220.131820.0011
Template processing1.619097.268320.8095
Template load and register function0.00020.012110.0002
states
state_id_array0.00100.061010.0010
state_identifier_array0.00100.060620.0005
Override
Cache load0.00180.1108210.0001
Sytem overhead
Fetch class attribute can translate value0.00130.081140.0003
Fetch class attribute name0.00110.065060.0002
XML
Image XML parsing0.00120.069740.0003
class_abstraction
Instantiating content class attribute0.00000.000560.0000
General
dbfile0.00240.1440270.0001
String conversion0.00000.000530.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
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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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