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
2 votes
3 answers
555 views

Calling ItemUrlBuilder method in Sitecore 10.1

We have upgraded to Sitecore 10.1 from Sitecore 8.7. In Sitecore 8.7 We used MultisiteItemLinkProvider which derives from LinkProvider and its obsolete in Sitecore 10.1. In Sitecore 8.7 we use the ...
0 votes
1 answer
122 views

Issue with links for a SXA Multisite when a site definition has multiple hostnames

I've got this odd issue with our Sitecore 10.2 with SXA implementation. I have a site definition that has multiple host names associated with it. On occasion, the links on the site will include the ...
0 votes
1 answer
256 views

Preview links with SXA

Let have example structure: Normally when there is no SXA tenants exist and New Sample Item is published, LinkBuilder.GetItemUrl() will return something like https://sc93sc.dev.local/en/New-tenant/...
0 votes
1 answer
181 views

Javascript link rendered without onclick attribute in preview

When using javascript link the edit mode renders the target script in onClick attribute <a href="#" onclick="javascript:void(0);onclick=javascript:openOverlay('test-overlay',event);...
1 vote
4 answers
525 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 ...
0 votes
0 answers
57 views

Sitecore 10.1 performance issue without Link Provider code

We upgraded from Sitecore 8.7 to Sitecore 10.1. We are experiencing multiple issues using the Link Provider. When using the existing Sitecore 8.7 LinkProvider code in Sitecore 10, we have observed ...
0 votes
2 answers
143 views

How should I remove the default home item & website name from the URL?

Recently I have upgraded our site from v10.0.2 to v10.0.3 using XM topology. After upgrade I have rebuilt the indexes / link databases as well. But after upgrading sitecore is generating URL like ...
1 vote
1 answer
43 views

Why are links rendering the full Sitecore content path?

I'm upgrading from SXA 1.9 to 10.2 and have noticed that links on the front-end are rendering the full Sitecore content path such as /sitecore/content/tenant/site/home/path. What can I check to fix ...
1 vote
1 answer
431 views

'Insert Link' link is not pointing to Site Home item

We are having multiple SXA sites under a tenant. For all the sites, when we click 'Insert link' on General Link field, able to see Home item of current Site. But, for one site (whose language is de-DE)...
0 votes
2 answers
682 views

Using Sitecore link Manager in scriban script

I have a general link that is linking to an item in Sitecore. Path to linked item --> /sitecore/content/home/pageItemWithLayout I am using the below scriban script below to render the item link. &...
0 votes
1 answer
166 views

Add query string to all Media item in Sitecore SXA 9.3

Is there any way by which I can add a query string in each media item requested in SXA include CSS, js, images, fonts, etc. Current URL - http://us.dev.local/-/media/base-themes/core-libraries/...
0 votes
0 answers
19 views

Sitecore And Web Service on Same Hostname not working [duplicate]

We have a Sitecore instance with a domain - abc.com and a Custom WebService is created which is also using the same domain as abc.com/internalservice.asmx, upon calling this service from Sitecore ...
1 vote
1 answer
199 views

File path not accessible from Sitecore link manager

Sitecore Version: 9.3 with SXA We want to access the local file directory from the Link on the website. For that, we have entered, file directory path in Insert External Link. After that, On the ...
1 vote
0 answers
60 views

Set General Link Internal Path Globally

Has anyone set the start path of the General Link field globally when choosing internal? I can do it per item/template, but looks like it requires custom code to have it applied globally. I thought ...
2 votes
1 answer
682 views

Looking for External link Manager in Sitecore to declare URLs in one common place and reuse them

I am looking for the option to maintain external links in common location and refer through out the pages. For example if my site uses link www.xyz.com/redirect in 100 pages , I will declare it in one ...
1 vote
0 answers
109 views

CustomLink provider is working on english but not on other languages

I've built a custom link provider which returns the complete url when the linked item is not from context website. It works as expected on english, but even if I add options.Language = Sitecore....
0 votes
1 answer
747 views

Sitecore 9.3 CustomLinkProvider [duplicate]

There is a similar questions but sadly there's no help in there. I'm trying to create a CustomLinkProvider in Sitecore 9.3 and I have 2 problems: The LinkProvider() is Obsolete. What should I use ...
0 votes
1 answer
237 views

Extend internal link functionality [duplicate]

Let there be 3 sites within same Sitecore instance. When a General Link links pages from site A to Site B or Site C, Sitecore returns the relative path, not the complete url, if using the "...
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 ...
0 votes
0 answers
32 views

Deobfuscate Sitecore.Kernell.dll [duplicate]

If anyone has been able to deobfuscate Sitecore.Kernell.dll to debug an issue, can you kindly list the steps. I need to investigate a prod issue with LinkManager. On adding log lines upto the point ...
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?
2 votes
1 answer
1k views

How to get URLS added in the Rich Text field and Link Manager Fields?

I want to redirect my urls added in the Rich Text Editor,General Links to custom urls on page load. To get the URLS which exist in the General Link field and in the Rich Text Editor, I am using the ...
1 vote
0 answers
151 views

Open graph URL does not contain language

I'm using Sitecore 9.1 and SXA 1.8, I want to embed the language in the og:url meta tag, I've checked the configuration of the LinkManager, languageEmbedding is set to true, but still it's not ...
1 vote
1 answer
246 views

Is there a way to automatically include link querystrings when dynamically rendering Sitecore links?

I have a number of places in my code where I render links from templates like so: <a href="@(Model.Link == null ? string.Empty : Model.Link.Url)">@Model.Link.Text</a> However I'...
2 votes
1 answer
533 views

LinkManager.ResolveTargetSite is obsolete - what is the replacement

In Sitecore 9.3, if I try and call LinkManager.ResolveTargetSite, I see an obsolete message: Please use IItemBasedSiteResolver instead. But I can find absolutely nothing about how to use ...
1 vote
0 answers
138 views

Enforce 443 port added in the generated media url

In my local environment, I have 2 sitecore JSS sites running and I need to make both available over http. one with port 80 and one with port 443. Example: http://abc.com http://abc.com:443 I ...
3 votes
0 answers
266 views

How to let Sitecore 9 RTE Link Manager use "id" attribute instead of "name" attribute for anchors

When adding an anchor link in the Link Manager inside a RTE field in Sitecore 9, the attribute name is used. This is no longer supported with html5 according to W3Schools: The name attribute is ...
1 vote
2 answers
985 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 ...
2 votes
1 answer
1k views

Render a link field that has a url with query params as a query param (version 7.2)

I'm trying to render a link like the following as an external link - however it's cutting off part of the query parameter. So when I try to render this: https://www.example.com?url=http://www....
1 vote
1 answer
99 views

Save multi values to image library with link reference

My question might be a little complex, but I appreciate any help: I am using SitecoreFieldSuite by Velir, in my Sitecore 8 solution. Officially, SitecoreFieldSuite isn't supported in Sitecore 8, but ...
7 votes
1 answer
3k views

Is there any way to add the custom Link manager provider just for a particular site

I am working with a multi-lingual multi site solution and I come across a case where I need to set a different link manager provider settings for only one of the sites in my solution. Is there a way ...
0 votes
0 answers
207 views

Sitecore language prefix not setting language cookie [duplicate]

This didn't seem to be an issue until recently. I have a language toggle on my site for English/French that when clicked, adds the appropriate language prefix to the current URL (e.g. /products -> /fr-...
0 votes
1 answer
174 views

Item accessible only via display name

As I know, by default, an item is accessible both via name and display name. This creates SEO issue because there is duplicate content. Is there a simple way to disable access via name or I need to ...
0 votes
2 answers
2k views

How to insert an internal path in Sitecore General Link field?

I have a template which contains a General Link field. If a new item is created of that template, then the link field should be populated with the item's current path. Suppose, template A have a ...
0 votes
0 answers
351 views

How to remove /sitecore/content/home from a URL using LinkManager? [duplicate]

I have a scenario in which LinkManager returns the URL with /sitecore/content/home/myitem. Here my domain is www.abc.com and I want to access this item as www.abc.com/myitem instead of www.abc.com/...
3 votes
1 answer
316 views

Media Provider ignoring site scheme setting

In a site setting you can set the scheme for the site. i.e. Scheme=https <site name="website"> <patch:attribute name="scheme" value="https"/> </site> The item Link Provider ...
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" ...
3 votes
1 answer
3k views

LinkManager.Provider is deprecated in Sitecore 9, how to get the default provider then?

The following code works in Sitecore 8.2 but not in Sitecore 9: var provider = LinkManager.Provider; The Provider property is not available anymore in Sitecore 9 Sitecore.Kernel, what should I use ...
1 vote
2 answers
260 views

Cache problems when generating links with the LinkManager class

I use the following block of code to generate the links of media items in a specific language: Sitecore.Links.UrlOptions urlOptions = Sitecore.Links.LinkManager.GetDefaultUrlOptions(); ...
1 vote
2 answers
534 views

Canonical url generation not using the correct hostname

I am currently using a html helper to generate a canonical url but the problem is the server url. The url is fetched from targetHostName (please correct me if I am wrong) The problem arrives in the ...
3 votes
2 answers
475 views

Language culture missing from url on post back

Language culture such as 'en' or 'en-gb' was initially present with a sitecore url. But after a post back, page returns with some validation errors and language culture is missing from url. What may ...
0 votes
1 answer
798 views

Glass RenderLink not rendering right media url

Sitecore verison - 9.0.2 Glass version - 5.0.6.0 We are trying to use Glass @RenderLink to render a pdf media item, it's generating anchor tag with below path /sitecore/media-library/site-content/...
0 votes
0 answers
100 views

Cross sites links are resolving as a context site link (Sitecore 9 Update 2) [duplicate]

I am having an issue in Sitecore 9.0.2 that cross sites links are not resolving properly. The link is resolved as a context site link and when I click on that link it gives me 404 so anyone has any ...
4 votes
0 answers
160 views

Using Experience Editor on a multisite solution. Custom linkProvider to solve problems?

We have multiple sites in sitecore but all are edited by the same editors and they want to be able to edit it all in one place. The majority of our editors use EE. Problems: When you follow a link (...
5 votes
1 answer
52 views

When should I use ScalableLinkProvider or ItemSearchLinkProvider?

I have noticed that the Sitecore.Buckets.LinkProviders namespace has 2 classes that extend the default LinkProvider: ScalableLinkProvider and ItemSearchLinkProvider. I cannot find any direct ...
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 ...
4 votes
0 answers
157 views

UseDisplayName is not working after renaming language code from fr-CA to fr

I have renamed language code from fr-CA to fr, Added fr version to all my content Items. Now the French name in the URL is not displaying? How to correct it? Link Manager Setting:Web.Config <...
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-@...
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 ...
0 votes
1 answer
1k views

Multilingual - Sitecore General Link Field Url Giving Embedded Language in Wrong Format

I have a requirement where my URL should be in format : http://domain/de-DE/pagename I have following settings done for my site: <setting name="Languages.AlwaysStripLanguage"> <patch:...