Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [link-manager]

For questions related to Sitecore's LinkManager, including behavior, customization and extension, custom providers, testing, etc.

Filter by
Sorted by
Tagged with
5 votes
2 answers
4k views

Sitecore multisite cross links not resolved with proper hostname

I've multisite solution setup, and sites config looks like below: <sites> <site name="localhost" hostName="local.com" scheme="http" notFoundItem="not-found" enableTracking="true" ...
nari447's user avatar
  • 407
1 vote
1 answer
3k views

Override Media Manager to Change Url

I need to insert text for a media item when getting a media type of PDF by changing the GetMediaUrl method. This is for an RTE field. I went to override the MediaProvider, but found it was obsolete ...
RReilley's user avatar
  • 755
14 votes
4 answers
23k views

How do you get the link for a media item?

I have an item in the media library in Sitecore and I want to place a link to that item on the site. How do I properly get the link for that media item?
Ed Schwehm's user avatar
  • 3,036
0 votes
1 answer
2k views

LinkManager Adds /sitecore/content into the URL

I am dynamically constructing the left menu for the product View: @foreach (var item in Model.Children) { <div class="btn btn-default"> <a id="lnk-@...
sindu's user avatar
  • 629
4 votes
2 answers
3k views

Create Sitecore Link with Powershell

I'm working on some reports using Sitecore Powershell Extensions. One requirement is to provide the public URL for various Sitecore items. I'm thinking this isn't really possible via Link Manager ...
Jason Booth's user avatar
3 votes
3 answers
2k views

LinkManager generating url for wrong site intermittently

We have Sitecore 9.3 multisite setup on Azure PAAS. We have been noticing a weird issue where for "internal" urls, LinkManager.GetItemUrl is intermittently generating urls for different site ...
Tiger's user avatar
  • 33
3 votes
1 answer
1k views

Omit bucket folders from page urls - linkprovider not working in SXA

I created a custom item resolver to remove/omit bucket folder item name from url. With this resolver we can access url from: www.xpto.com/folder/2018/08/06/15/40/page www.xpto.com/folder/page And ...
Pedro Luís's user avatar
1 vote
4 answers
656 views

How to Remove Dependable Links when deleting item using item.Delete()

We are programmatically removing items using item.Delete() in C#. Deleted items that were linked to other items are appearing as broken link When manually deleting in Sitecore we get options like ...
Sylesh JL's user avatar
  • 179
1 vote
2 answers
1k views

General Link - Insert Javascript contains return false causes error

When I tried to put a simple javascript inside the Insert Javascript of General Link it wasn't able to make it properly work as I noticed it appends a return false which causes an error. The rendered ...
Jovit Mayo's user avatar
0 votes
1 answer
1k views

Custom Link Provider in Sitecore 9.3

I am upgrading from Sitecore 9.1 to Sitecore 9.3. I have a CustomLinkProvider class which derives from LinkProvider which is obsolete in Sitecore 9.3. What is the replacement for this in Sitecore 9.3?
Prateek's user avatar
  • 61