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 » Current URL
expandshrink

Current URL

Current URL

Monday 03 January 2011 2:27:29 pm - 3 replies

How to get current URL from the browser?

Monday 03 January 2011 2:58:20 pm

Hi Namita,

You can use the $requested_uri_string which comes from the pagelayout. For more information see this documentation page : http://doc.ez.no/eZ-Publish/Technical-manual/4.4/Templates/The-pagelayout/Variables-in-pagelayout

Tuesday 04 January 2011 1:22:20 pm

$requested_uri_string will provide me the system URL.

But I want the Current compete URL from browser address bar.

Thanks

Namita

Tuesday 04 January 2011 4:17:52 pm

$requested_uri_string will provide me the system URL.

But I want the Current compete URL from browser address bar.

Hi Namita,

You can generate the full URL using the 'ezurl' operator :

<a href={$requested_uri_string|ezurl( '','full')}>Current URI</a>

When requesting a content/view/<view-mode>/<node-id> type of URL, you should get the URL Alias (friendly URL, not system one) in the $requested_uri_string variable, then leading to the generation of the URL seen in the browser's address bar.

Let us know how things go,
Cheers,

expandshrink

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

36 542 Users on board!

Forums menu

Proudly Developed with from