This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit ezplatform.com

eZ Community » Forums » Developer » concat and ezurl
expandshrink

concat and ezurl

concat and ezurl

Wednesday 07 April 2010 10:39:35 am - 3 replies

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"

Modified on Wednesday 07 April 2010 10:41:48 am by Fabien Audin

Wednesday 07 April 2010 11: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 blunk.gif Emoticon

Modified on Wednesday 07 April 2010 11:01:03 am by Fabien Audin

Wednesday 07 April 2010 11: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 happy.gif Emoticon

Wednesday 07 April 2010 11:49:40 am

Hi Niko,

Thanks a lot. I didn't think about that blunk.gif Emoticon

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from