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
2 votes
1 answer
33 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
0 votes
0 answers
38 views

Duplicate related items in Links under Navigate after Sitecore upgrade to 10.2

Upgraded an application on Sitecore XM from version 9 to 10.2.1. I installed Sitecore CM\CD via SIF and performed the clean-up of databases as per the SC-XP-10.2.0-Upgrade-Guide-en under section 3.1.3....
Siddhi Kamat's user avatar
1 vote
3 answers
103 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
0 votes
0 answers
51 views

Error message in EXM when using the external image hosting link

I have created an Email campaign via Sitecore, and in my HTML code for the E-mail I used an external link for the image (from the media hosting). When I wanted to send it out via list delivery, I got ...
Lizaveta Andryukhina's user avatar
0 votes
1 answer
90 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 ...
soze's user avatar
  • 93
1 vote
2 answers
172 views

Sitecore XM Cloud - Links not editable in Pages or Experience Editor

I'm working on a Sitecore XM Cloud project and we're creating front-end react components in Next.js. We're using the Sitecore Next.js JSS SDK for rendering the component data. That said, if we have a ...
Matthew G's user avatar
3 votes
1 answer
93 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
  • 157
0 votes
1 answer
51 views

How do I add an external URL to my site's navigation menu?

I am new to Sitecore and I am trying to figure out how to add an external URL link to the site's navigation menu. The URL in question is supposed to link to the business's YouTube channel. I've ...
Hamadyne's user avatar
1 vote
2 answers
678 views

How to update the link field properties in Sitecore Powershell Extensions?

I want to write a script to bulk update the link field title and text for all the components of a particular type to Read more but I struggle with figuring out how to update these properties. Here is ...
RobB's user avatar
  • 13
1 vote
2 answers
408 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
0 votes
1 answer
54 views

How to set the 'Link Description' value from CMS

I am using a Link component and I want to make the 'Link Description' field a dynamic value. Is there a way to set the 'Link Description' value from the CMS side?
Anjali Nirmani's user avatar
1 vote
1 answer
636 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
138 views

Creating Internal Links in General Link Fields is Failing in Sitecore 8.2 Environments

We have a few templates in our project which use the General Link field type. We're finding them unpredictable. In our Staging environment, by clicking the Insert Link field to create a link to ...
Ron Ritchie's user avatar
0 votes
1 answer
224 views

Custom link target in sxa

I was trying to insert an external link . In link target there was an option in target is custom. What does it mean?
Vinesh's user avatar
  • 85
1 vote
1 answer
254 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
0 votes
1 answer
174 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);...
nari447's user avatar
  • 407
1 vote
2 answers
266 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,678
1 vote
1 answer
351 views

How do I force the Sitecore FieldRenderer or Glass.Mapper, when rendering rich text fields, to always render absolute urls for my API?

I have an API in Sitecore that takes content from Sitecore and provides it to an external non-Sitecore site. While retrieving content, the API renders a rich text field using a glass mapper. This rich ...
TxRegex's user avatar
  • 141
0 votes
1 answer
420 views

Sitecore 9 CMS - Add an Image to a Link in the Footer

A client is using Sitecore 9 - we are not Sitecore developers. We've been asked a simple thing: add social media links to the Footer of their Sitecore site. Its proving more difficult than expected. I'...
JTech's user avatar
  • 103
1 vote
1 answer
88 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
595 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
0 votes
2 answers
743 views

How Does One Create a Download Link to Media Library Content in Rich Text Editor

A page on the site contains rich text, part of which is a series of links to PDF documents the user can download. Clicking on these, however, results in a 404 error. I've tried several RTE editing ...
Ron Ritchie's user avatar
1 vote
1 answer
2k views

Append query string to url

I have a page lets say Page1. Page1 will have a button called GoToPage2. In the GoToPage2 button, I need to read the querystring and append its value to the url For example: The GoToPage2 link is /...
user avatar
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
1 vote
1 answer
235 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'...
Erica Stockwell-Alpert's user avatar
2 votes
0 answers
195 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
983 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
1 vote
1 answer
371 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
280 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
  • 557
5 votes
1 answer
390 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
1 vote
1 answer
326 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 ...
Prashant Tomar's user avatar
2 votes
1 answer
35 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
0 votes
2 answers
4k views

Retrieving url from general link field in rendering parameter

I'm trying to grab the id and/or url attribute of a general link rendering parameter in the view, but I can't seem to make it work. I can't cast it to a Linkfield (it says it can't cast a string to a ...
Levi Wallach's user avatar
  • 1,075
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,075
0 votes
1 answer
210 views

Update Sitecore rendered links for a specific page

We are using Sitecore 9.0.2 & SXA 1.7.1 and we need to update all links to be absolute only in a specific page as by default all the links are relative for example this is the default link <a ...
Alivor Tikos's user avatar
0 votes
2 answers
2k views

Richtextbox (RTE) link.aspx custom link provider/pipeline

so far I understand the richtextbox, when I insert a Internal sitecore link a href is created with link.aspx?_id=siteguid which is replaced in preview or published mode with the right url. <a href=...
squadwuschel's user avatar
  • 1,165
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 ...
PSS's user avatar
  • 607
0 votes
1 answer
72 views

Cache of links - error

I have a strange problem with links. On the website I have many components added (one have one link and the other many links). In Experience Editor everything works correctly in Edit mode. After ...
Jan Nowak's user avatar
  • 311
1 vote
1 answer
749 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
303 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
0 votes
0 answers
240 views

Insert javascript to link not working as expected [duplicate]

Using insert javascript on link field, adds javascript code to a tag in href with return false which is added automatically and because of it mistake appears and if manually delete return false ...
John Vein's user avatar
  • 141
1 vote
1 answer
945 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,335
2 votes
1 answer
494 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
1 vote
0 answers
1k views

Download Sitecore Media file from UI

In our application we have an excel (xlsx/xls) file in medial library. We are trying to create a functionality to be able to download this excel using an html anchor or button. But when we click on ...
Praveen K Dubey's user avatar
5 votes
1 answer
970 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
1 vote
1 answer
759 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
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
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
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
3 votes
1 answer
561 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