Forums / Developer / concat and ezurl

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 ;)