Create link to Sitecore Item

前端 未结 6 1877
Happy的楠姐
Happy的楠姐 2021-02-07 00:42

I know I have done this before but I can\'t seem to remember where or how.

I want to create a link to an Item in Sitecore. This code:

Sitecore.Data.Items         


        
6条回答
  •  死守一世寂寞
    2021-02-07 01:11

    If you are still using Sitecore 5.3, you can use this. Be warned this method is deprecated in Sitecore 6.0.

    string url = item.Paths.GetFriendlyUrl();
    

提交回复
热议问题