Developer forum

Forum » Templates » Get Item Page URL.

Get Item Page URL.

Yasharth Tahiliani
Reply

Hi,

How may I get the Page URL in a Razor template?

I use @GetValue("DwPageName") to get the Page Name. Just need to access the Page URL.

Thanks & Regards,

Yash.


Replies

 
Nicolai Høeg Pedersen
Reply

Always use Default.aspx?ID={pageid} - Dynamicweb will convert it for you.

If you still think you need it, get it from Dynamicweb.Frontend.searchFriendlyUrls.GetFriendlyUrl

 

You must be logged in to post in the forum