url alias just for content class object

Author Message

Gert Mellak

Wednesday 02 December 2009 11:29:17 pm

I'd like to get a content class object's url alias without the leading folders' aliases ...

Let's say I've got an object "contact" in the folders company/about us, the normal url alias would be company/about_us/contact ... how can I just get the "contact" part?

Thanks in advance!

Gert

Yannick Komotir

Thursday 03 December 2009 9:09:29 am

Hi,

$node.path_array

<|- Software Engineer @ eZ Publish developpers -|>
@ http://twitter.com/yannixk

Gaetano Giunta

Friday 04 December 2009 3:13:51 am

Or you split url_alias on /, and take the last element - hackish, I know... ;)

Principal Consultant International Business
Member of the Community Project Board

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 02:59:25
Script start
Timing: Jan 18 2025 02:59:25
Module start 'layout'
Timing: Jan 18 2025 02:59:25
Module start 'content'
Timing: Jan 18 2025 02:59:25
Module end 'content'
Timing: Jan 18 2025 02:59:25
Script end

Main resources:

Total runtime0.6146 sec
Peak memory usage4,096.0000 KB
Database Queries59

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0041 589.4375152.6250
Module start 'layout' 0.00410.0022 742.062539.4453
Module start 'content' 0.00630.6069 781.5078570.6094
Module end 'content' 0.61310.0014 1,352.11728.1563
Script end 0.6145  1,360.2734 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.4859160.0002
Check MTime0.00120.1963160.0001
Mysql Total
Database connection0.00060.089710.0006
Mysqli_queries0.573493.2961590.0097
Looping result0.00050.0802570.0000
Template Total0.591196.220.2955
Template load0.00170.283320.0009
Template processing0.589395.891120.2947
Template load and register function0.00020.034810.0002
states
state_id_array0.00070.117410.0007
state_identifier_array0.00060.102120.0003
Override
Cache load0.00140.2299140.0001
Sytem overhead
Fetch class attribute can translate value0.00040.069630.0001
Fetch class attribute name0.00130.214550.0003
XML
Image XML parsing0.00120.193530.0004
class_abstraction
Instantiating content class attribute0.00000.002150.0000
General
dbfile0.00170.2799220.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
3content/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
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/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: 11
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs