Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [link-manager]

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

1
vote
2answers
40 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(); ...
0
votes
0answers
24 views

Use @Html.BeginForm() instead of @Html.BeginRouteForm(Sitecore.Mvc.Configuration.MvcSettings.SitecoreRouteName, FormMethod.Post) [duplicate]

When we use @Html.BeginRouteForm(Sitecore.Mvc.Configuration.MvcSettings.SitecoreRouteName, FormMethod.Post) in sitecore mvc view, language culture is not present with form's action attribute like ...
1
vote
2answers
35 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
2answers
75 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
0answers
46 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 ...
0
votes
1answer
53 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/...
3
votes
0answers
56 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 (...
3
votes
0answers
38 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 ...
5
votes
1answer
32 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 ...
2
votes
1answer
101 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
0answers
57 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 <...
3
votes
2answers
288 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" ...
0
votes
1answer
284 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-@...
0
votes
1answer
344 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:...
0
votes
1answer
475 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 ...
5
votes
1answer
641 views

Language specific URLs with UseDisplayName and LinkManager

We have a site where I need to add hreflang on each page, linking to each language version of the page. <link rel="alternate" href="https://domain/pants" hreflang="en"> <link rel="alternate" ...
5
votes
3answers
677 views

How to get item url without using Linkmanager?

Hello i need to get the url from a Sitecore ítem but without using the LinkManager class from Sitecore because i can't mock it. What is the best approach to do unit tests when i need information from ...
3
votes
0answers
142 views

Multiple sites and url management

I'm having some problems configuring sitecore the way I need. I have 3 sites: Content Site1 Site2 Site3 Site1 url should be www.site1.com Site2 url should be www.site2.com Site3 url should be www....
0
votes
1answer
106 views

displayName for each language is not used by LinkManager [duplicate]

For an item I have 2 version for 2 languages with a different displayName for each. The displayName are : Item_01_EN for the EN version Item_01_FR for the FR version Now the problem is, when I use ...
4
votes
1answer
443 views

Sitecore LinkManager in PowerShell generate wrong protocol

I have next powershell code for getting page url by item function Get-ItemUrl($item){ $urlOptions = [Sitecore.Links.LinkManager]::GetDefaultUrlOptions() $urlOptions.AlwaysIncludeServerUrl = $...
6
votes
1answer
1k 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 ...
7
votes
1answer
2k views

How to change language code in URL

We have a multi language site with English and Thai and I need to change the default language code in URL for the Thai pages. eg: mysite.com/th-th/about should become mysite.com/th/about My code ...
13
votes
3answers
2k views

LinkManager returning inconsistent Server Url

So, I have a rather complex issue to detail out here. the TL;DR is that Link Manager is returning inconsistent results in the GetServerUrl() method when given what appears to be the same parameters. ...
0
votes
1answer
58 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 ...
4
votes
2answers
544 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 ...
-1
votes
1answer
82 views

Is it possible to move “Display name” out of standard fields?

I want to configure my Link Manager to utilize the Display Name field when generating URLs, like so: <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> <sitecore> <...
7
votes
1answer
191 views

Ramifications of removing encodeNameReplacement for dot (.)

Sitecore has a number of encodeNameReplacements in config OOTB, I fully understand what they are and what they do since I have previously posted about it. The issue we have is we have a number of ...
11
votes
4answers
11k 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?
12
votes
2answers
407 views

Create link as CD from CM

We have a Sitecore installation with a content management server and a content delivery server. Now: I have an item, for which I want to create a link (for sending in an email). The link should be ...