concat and ezurl

Author Message

Fabien Audin

Wednesday 07 April 2010 1:39:35 am

Hello,

I have one homepage, which is located here http://www.homepage.com/ (not valid link).

I have one element which is located here http://www.homepage.com/index.php/element/(id)/4 (not valid link).

When I write my href in the "a" tag writing this line : "...href={concat("/element/(id)/", $element.node_id, "/" )}" the link on the website is : "http://www.homepage.com/element/(id)/4 but I need this link : "http://www.homepage.com/index.php/element/(id)/4"

Do you know how can I get it?

I tried :

- "...href = {concat("/element/(id)/", $element.node_id, "/" )}"

- "...href = {concat("/element/(id)/"|ezurl, $element.node_id, "/" )}"

- "...href = {concat("/element/(id)/"|ezurl(no), $element.node_id, "/" )}"

- "...href = {concat("/element/(id)/"|ezurl(no, full), $element.node_id, "/" )}"

- "...href = {concat("element/(id)/"|ezurl, $element.node_id, "/" )}"

- "...href = {concat("element/(id)/"|ezurl(no), $element.node_id, "/" )}"

but without success

Could you help me please, I'm no comfortable with links and "...|ezurl"

Fabien Audin

Wednesday 07 April 2010 2:00:47 am

It's ok! The link I had on the website was "http://www.homepage.com/index.php/element/(id)4" there was one "/" missing.

I wrote this line : "...href = {concat("/element/(id)/"|ezurl(no), "/", $element.node_id, "/" )}" because "element/(id)/"|ezurl(no) will delete the '/' after "(id)/".

Bye have a good day all ;)

Niko Goers

Wednesday 07 April 2010 2:01:27 am

Hi Fabien,

take a look at this:

{concat( '/element/(id)/', $element.node_id )|ezurl( 'no' )}

You have to use the ezurl operator after concating the uri string :)

eZ Publish partner - http://www.all2e.com
http://share.ez.no/directory/companies/all2e-gmbh
http://ez.no/Partners/all2e-GmbH

Lords of Heaven - http://www.LoH-Gilde.de (Created with eZ Publish)
German online gaming guild

About me - http://www.NikoGoers.de

My roadmap, +1 are welcome: http://share.ez.no/community/roadmap/10889

Fabien Audin

Wednesday 07 April 2010 2:49:40 am

Hi Niko,

Thanks a lot. I didn't think about that ;)

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 03:06:27
Script start
Timing: Jan 18 2025 03:06:27
Module start 'layout'
Timing: Jan 18 2025 03:06:27
Module start 'content'
Timing: Jan 18 2025 03:06:28
Module end 'content'
Timing: Jan 18 2025 03:06:28
Script end

Main resources:

Total runtime0.7260 sec
Peak memory usage4,096.0000 KB
Database Queries60

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0063 587.8047152.6094
Module start 'layout' 0.00630.0039 740.414139.4141
Module start 'content' 0.01020.7144 779.8281547.7734
Module end 'content' 0.72460.0014 1,327.601612.1875
Script end 0.7260  1,339.7891 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.4427160.0002
Check MTime0.00130.1726160.0001
Mysql Total
Database connection0.00110.146710.0011
Mysqli_queries0.670392.3295600.0112
Looping result0.00060.0786580.0000
Template Total0.696996.020.3485
Template load0.00210.287620.0010
Template processing0.694895.707420.3474
Template load and register function0.00030.046010.0003
states
state_id_array0.00050.070510.0005
state_identifier_array0.00100.135720.0005
Override
Cache load0.00170.2373320.0001
Sytem overhead
Fetch class attribute can translate value0.00050.073520.0003
Fetch class attribute name0.00130.183350.0003
XML
Image XML parsing0.00080.109120.0004
class_abstraction
Instantiating content class attribute0.00000.001650.0000
General
dbfile0.00140.1956160.0001
String conversion0.00000.001240.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
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/strong.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/strong.tplEdit templateOverride template
1content/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: 15
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs