Questions tagged [links]

For questions related to links and link field-types within Sitecore, including rendering, setting, references, etc.

Filter by
Sorted by
Tagged with
12 votes
4 answers
3k views

Removing all references to an item using OOTB tools

Is there a way, in one fell swoop, to remove all references to a item? I know that it's possible to view a list of referring items from the report but is there anything out-of-box to handle the ...
Jonathan Brown's user avatar
11 votes
2 answers
6k views

Setting the target on an internal link field

Is the link target dropdown editable somewhere in the Sitecore tree? On a Sitecore v8.0 (rev. 150812) system, when editing a General Link field, the content editor is unable to set the "target" ...
Derek Dysart's user avatar
  • 2,489
6 votes
1 answer
1k views

Cross-site links not resolving correctly in RTE fields on multi-site environment

We have two sites www.site1.com and www.site2.com. We are having problem when trying to create cross site relative links in RTE field. For example. In RTE field of site2 site, if we insert a ...
Akaa's user avatar
  • 173
6 votes
2 answers
1k views

How to deep link into Experience Editor so that user is redirected after login?

We have a case where we need to notify approvers when a page is sent for approval. In the notification email, I want to include a link so that the approvers can go directly to the page in the ...
Jonas Hamnered's user avatar
6 votes
1 answer
2k 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" ...
Thomas Bæk's user avatar
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
5 votes
1 answer
994 views

How can I append HTML within and before the text of a rendered Link Field?

I have a General Link field in Sitecore that I would like to append some HTML to. I know that I can create a custom extension method and put what I want after the link's text by doing the following: ...
James Skemp's user avatar
  • 1,398
5 votes
1 answer
3k views

How to display PDF link in Sitecore page

I'm using Sitecore 9 and SXA 1.7. I have a few PDF files that I have uploaded into media library/files/myfolder, and an "instructions" template whose fields are title (type: single line text), Date (...
Mie ElMansy's user avatar
5 votes
1 answer
405 views

Hostname not resolving

I have issues with Sitecore Azure PaaS from Sitecore Managed Cloud as below. We have red-shield which is security shielding for request where we have configured prod domain which is like prd.xyz.com ...
Nikhil Kulkarni's user avatar
4 votes
2 answers
2k views

Sitecore General Link linking to itself (internal item) by default

Every BasePage template I have has a general link field that needs its value to be set to itself by default, with the ability to change it. Is there anyway to do this on the standard values of the ...
rfraczkowski's user avatar
4 votes
2 answers
2k views

Obtaining a site url with correct binding port dynamically

I have a situation where I need to obtain a link to the item at my site to use it in an e-mail notification. I currently do it like this: var baseUrl = new Uri(Sitecore.Globals.ServerUrl);. This ...
Elena P's user avatar
  • 631
4 votes
2 answers
2k views

Set Data Attributes for Links to Certain Items

I have an item type called footnote. Whenever a content editor links to an item of this type I want a data attribute to be set instead of setting an href. The data attribute will contain the html that ...
Teeknow's user avatar
  • 2,477
3 votes
3 answers
1k views

Alias are not coming from language specific item version

We have created an alias item from /sitecore/templates/System/Alias. We need to use different url for different languages. To do this we have made "Linked item" item not shared. but it is picking the ...
Gaurav Kumar's user avatar
3 votes
1 answer
2k views

How to get a list of all external links

We want to move from http to https. Therefore we need a list of all external links in order to determine which ones have to be changes if external content is embedded. How can this be accomplished?
user1129's user avatar
3 votes
2 answers
1k views

Custom Link Provider is not overriding

We have created an item resolver to maintain Sitecore path on our way. We have inherited LinkProvider to override GetItemUrl method like the below: public class LinkProvider : Sitecore.Links....
Akaa's user avatar
  • 173
3 votes
1 answer
573 views

Creating LinkField from XML

Sitecoore 9: I need to create a LinkField from a general link's xml E.g. <link text="Text" linktype="internal/external" url="url" anchor="anchor" title="title" class="class" querystring="...
Steve Ward's user avatar
3 votes
1 answer
3k views

retrieving the url from a link field in a view

I'm trying to retrieve just the url attribute of a link field for an item in a view. The view is just using the item as it's model so just retrieving the link field value, which is producing the ...
Levi Wallach's user avatar
  • 1,085
3 votes
1 answer
116 views

How to add new target to Internal Link in Sitecore Experience Editor

We are required to bring a custom target attribute in sitecore general link field called “Preview” <a href=”xxx” target=”preview”>XXX</a> We added a new item in Sitecore Core Database ...
Sylesh JL's user avatar
  • 179
3 votes
1 answer
830 views

What is the easiest way to remove the language and hash from PDF links in Sitecore RTE in 8.1?

We have a link like this in the RTE: http://xyzcompany.com/-/media/xyz/PDFs/71-43444_xyz_guide.pdf#page=13?la=en&hash=8993E559F610238AA496E3A5EE4ACD388E231211 when it is rendered out. However, the ...
Toby Gutierrez's user avatar
3 votes
0 answers
2k views

How to set default language for the website

We have a website with two languages - en & jp. When the URL mysite.com is browsed, it should load jp content. Just like browsing mysite.com/jp, but the URL should be mysite.com The Site ...
sukesh's user avatar
  • 3,129
3 votes
1 answer
467 views

No returnUrl property for secured media links

I've got authentication set up on certain pages of my website, with anonymous access denied. For regular items/pages, this works like regular forms authentication as you'd expect - click a link or go ...
Ken McAndrew's user avatar
  • 5,102
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 ...
Gautam Aneja's user avatar
2 votes
1 answer
735 views

Can't drag & drop SXA components in overlay content (through experience editor)

I'm trying to edit an overlay content component in the Experience Editor but i just realized that i can't use SXA components such as Rich Text, Links etc (The drag & drop works but once it's ...
Slrg's user avatar
  • 289
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....
Sean T's user avatar
  • 240
2 votes
1 answer
307 views

I need to override the SitecoreFieldLinkMapper, how do I ensure that the mapper isn't ran twice?

When overriding SitecoreFieldLinkMapper, I add my new custom mapper to the CreateResolver method so it can be ran with all the other custom mappers. How do I ensure that only this custom mapper is ran ...
nebulae1's user avatar
2 votes
1 answer
530 views

How to configure sitecore rich text editor not to replace url to relative.

I have strange behavior at Rich Text editor (I heard that everyone had it), when user add some Absolute url for example, https://www.example.com/mypage/someextra, after save Sitecore replace it to ...
Arbejdsglæde's user avatar
2 votes
1 answer
35 views

Links table on multiple publishing targets out of sync

We have set up 2 publishing targets (web and web2). The web items tables are in sync with the same number of items and the items match when comparing. The problem is we are seeing the links tables ...
Richard Banks's user avatar
2 votes
3 answers
624 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 ...
Owais Ahmed's user avatar
2 votes
0 answers
209 views

How do you disable rel='noreferrer' for external links?

Our ProtectExternalLinksWithBlankTarget is set to true so all our external links have the rel='noopener noreferrer' attribute, but we need to be able to allow some external links to be recognized as ...
221BakerSt's user avatar
2 votes
1 answer
38 views

Additional links next to Field name?

I am new to develop using Sitecore and have a question I saw in some tutorial website there are addition links next to the field name, like [Go to field] [Reset Field] [Go to datasource] Is this ...
Anthony's user avatar
  • 23
2 votes
0 answers
412 views

Target attribute on external link is not getting rendered [duplicate]

I'm working on Sitecore 8.0 rev. 151127. I have tried all the options provided in question at here However I am unable to get target attribute render in anchor tag. When I see the raw values for the ...
Mohit Dharmadhikari's user avatar
2 votes
0 answers
102 views

How can I place internal links into WFFM

How can I insert internal links into these WFFM places: WFFM Introduction and Footer text Text of a checkbox field I would like to give the chance to the content editor to edit these links with the ...
Imre Németh's user avatar
2 votes
0 answers
574 views

Link 'title' attribute not mapping correctly in Glass Mapper

I am using Glass.Mapper.Sc 4.3.4.197 and for some reason the "title" attribute ("Alternative Text" property of the link field in Sitecore; Link.Title property in Glass.Mapper) appears to not be ...
Zachary Kniebel's user avatar
2 votes
0 answers
2k views

Make RTE output media item links with a path instead of ID

In Sitecore 8.1, I would like to align the download links to media items (files), as links can be outputted in two different ways for the same item: Links with an ID my.site.com/_/media/...
ChristianH's user avatar
2 votes
0 answers
836 views

General Link - Raw Value inside but not editable in Field

I have a general link field where the value is still inside when I look at the raw value but the field seems to be empty and has to be cleared before it is editable again. How do I fix that and what ...
Kodachi's user avatar
  • 193
1 vote
1 answer
660 views

How to set link field href attribute to "#"

Using a general link field, I want to be able to author the field such that the final contents of an outputted link are: <a href="#">Anchor Text</> (notice the empty anchor "...
Marcel Gruber's user avatar
1 vote
3 answers
163 views

How can I check all internal link target values from the entire content tree using Sitecore PowerShell?

Im writing a powershell script which at the moment is checking an item ID, and if it contains an internal link that is set to anything other then "Active Browser" it will change the Target ...
user13705's user avatar
1 vote
1 answer
100 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 ...
Arbejdsglæde's user avatar
1 vote
1 answer
114 views

Remapping links to a new page

We're wanting to replace an existing item/page in the content tree with another that uses a new template design but will have the same item name (there's a reason we can't use the template change ...
Andy's user avatar
  • 11
1 vote
1 answer
392 views

How to cache bust CSS and JS assets in Sitecore Helix

I want to be able to loop through my views, particularly my main layout and apply a query string cache buster to our CSS and JS calls as follows: <link rel="stylesheet" href="/assets/css/style.css?...
Marcel Gruber's user avatar
1 vote
1 answer
291 views

Enforce Site-Wide Alternate Text Validation On General Link Fields

I am working on Sitecore version 9.1. When attempting to insert a link using the general link field, the user is prompted to enter the following information: In an effort to enforce accessibility on ...
c-bro's user avatar
  • 567
1 vote
1 answer
772 views

Is there a way to use the Sitecore MVC Field helpers and render a General Link with stuff appended to the query string?

I have an item with a General Link field named "MyLinkField". In my view I have the following: @Sitecore.Html().Field("MyLinkField") That works great to output the link. Now I have added a ...
Corey Burnett's user avatar
1 vote
1 answer
770 views

How to change name of external link when viewing in its rendering variant?

I'm using Sitecore 9 and SXA 1.7. I have a template with a "General link with search" field, and I created several items of that template where I need to "insert external link", after that I set the ...
Mie ElMansy's user avatar
1 vote
2 answers
53 views

Urls in CanonicalUrl Rendering Showing Http Instead of Https

I'm hoping this is an easy one. The CanonicalUrl rendering in the Metadata Partial design isn't honoring our https settings for the website. Instead, it always shows http in the canonical link for ...
creativeflood's user avatar
1 vote
1 answer
777 views

Redirect url with Trailing slash in the end of every url

I have a requirement where I need to redirect every URL and add trailing / in the end. Example : www.site1.com/abc should redirect to www.site1.com/abc/. Forward slash "/" should be added to ...
Vikram's user avatar
  • 9
1 vote
1 answer
289 views

How can I get link fields content copied to another language version using Sitecore PowerShell Module?

when I create new language version item of content using: Add-ItemLanguage -Item $imageItem -Language $baseLang -TargetLanguage $targetLang -IfExist OverwriteLatest content page link field ...
user avatar
1 vote
2 answers
303 views

Link Database - rebuild specific items instead of whole database

Anyone know if there is a way to rebuild specific items in link database through a custom script targeting specific items to rebuild links to? OOB Sitecore only supports rebuilding the whole link ...
Diego's user avatar
  • 5,688
1 vote
1 answer
340 views

Sitecore item API for shell site not returning the content

When I click on the "insert link" of the general link field, then the complete tree is not opened (as shown in the screenshot below), due to which I am not able to select the item. When I checked the ...
Jumping Rabbit's user avatar
1 vote
1 answer
311 views

Droplink value is always returning null in post action

I am trying to build a form which contains state as droplink and given datasource as states . here's the snippets of my employee model and state. i am getting all the states in the get action of ...
Naveen Dharnamoni's user avatar
1 vote
1 answer
1k views

Equals sign (=) added after valueless query string parameters

When rendering an external link from a General Link field using the Glass Mapper BeginRenderLink helper, any query string parameters without values are getting an equals sign (=) added after them. An ...
Dan Sinclair's user avatar
  • 5,395