Create link to Sitecore Item

前端 未结 6 1879
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:19

    You're needing this one, assuming you're running Sitecore v6 or anything more recent (tested with 8.2-6, should work with 9 too):

    Sitecore.Links.LinkManager.GetItemUrl(item);
    

提交回复
热议问题