Skip to main content
15 votes
Accepted

Removing all references to an item using OOTB tools

Not quite. But here's what I would do. Serialize your item Delete the original item, instructing Sitecore to delete all references Deserialize your item Requires access to the Developer Tab, but is ...
Mark Cassidy's user avatar
  • 25.4k
14 votes
Accepted

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

This is a pretty common business-case in Sitecore multi-site projects, and fortunately there is pretty good support for cross-site links OOTB. If what you need isn't available OOTB or if it isn't ...
Zachary Kniebel's user avatar
10 votes
Accepted

Setting the target on an internal link field

This is a known issue with the General Link Field. To fix it open the Core database and navigate too: /sitecore/client/Applications/Dialogs/InsertLinkViaTreeDialog/PageSettings/...
Richard Seal's user avatar
  • 20.8k
10 votes
Accepted

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

Instead of linking to an item with an id parameter, instead link to the full item URL with sc_mode=edit parameter set, e.g. {cmsHost}/path/to/item-page?sc_lang={itemLanguage}&sc_version={...
jammykam's user avatar
  • 13.9k
7 votes
Accepted

How to get a list of all external links

Solution 1. SPE I recommend using Sitecore Powershell Extensions for that. Example code snippet: $fields = "Content", "Title" $startPath = "/sitecore/content/Playground/Playground/int/Home" $phrase ...
Alan Płócieniak's user avatar
7 votes

Removing all references to an item using OOTB tools

This doesn't satisfy the out-of-the-box requirement but may prove useful if that criteria doesn't apply in other situations. Here's a method using Sitecore Powershell Extensions: $item = Get-Item -...
Kasaku's user avatar
  • 4,184
6 votes
Accepted

Link Browser doesn't show all child items from Tree?

I figured this out. I made the update to change the value of LinkDatabase.MaximumBatchSize to 1000 as suggested and it didn't work. <sitecore> <settings> <setting name="...
Adam Seabridge's user avatar
6 votes

Setting the target on an internal link field

This is a know bug, please perform the following steps in the "core" database: 1) Navigate to the "/sitecore/client/Applications/Dialogs/InsertLinkViaTreeDialog/PageSettings/TargetsSearchPanelConfig" ...
Vlad Iobagiu's user avatar
  • 18.8k
6 votes

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

Try putting the below in the standard value's raw values: <link text="link text" linktype="internal" class="" title="" target="" querystring="" id="$id" anchor="" />
Andrey Bobrov's user avatar
6 votes
Accepted

How to set link field href attribute to "#"

Use Insert JavaScript option Specify Link description only (in your case 'Anchor Text') Example Field raw value <link text="Anchor Text" linktype="javascript" url="" ...
Alan Płócieniak's user avatar
5 votes
Accepted

Sitecore multisite cross links not resolved with proper hostname

I've had to add urlOptions.SiteResolving = true in my LinkProvider override and my GetItemUrl extension to get this to work properly. This is in Sitecore 8.2 and older versions, not sure about ...
Melanie's user avatar
  • 66
5 votes
Accepted

Language specific URLs with UseDisplayName and LinkManager

You're still trying to generate link to the item version which is in your language. Try getting the other language version first: var otherLanguageVersion = Sitecore.Context.Item.Database.GetItem(...
Marek Musielak's user avatar
  • 24.2k
5 votes
Accepted

Obtaining a site url with correct binding port dynamically

Sitecore.Globals.ServerUrl is set in the Globals.Load function by calling WebUtil.GetServerUrl(HttpContext.Current.Request.Url, false). The code for that is: public static string GetServerUrl(Uri ...
Richard Seal's user avatar
  • 20.8k
5 votes
Accepted

How to display PDF link in Sitecore page

Did you create variant items under reference field? You need to display something in order to render a link. It works fine on my machine. Here are screenshots with the setup: Template Content ...
Alan Płócieniak's user avatar
5 votes
Accepted

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

You'd basically want to override the text element in the field renderer: Something along these lines: @{ var linkField = (LinkField) Model.Item.Fields[fieldname]; } @Html.Sitecore().Field(...
Jarmo Jarvi's user avatar
4 votes

Removing all references to an item using OOTB tools

Tricky answer : Please perform the following steps: 1. Open the Content Editor application. Select the item, links on which you want to delete. Press the delete button in the home tab on the ribbon. ...
Vlad Iobagiu's user avatar
  • 18.8k
4 votes

Custom Link Provider is not overriding

Please verify that your patch file is patching correctly. Since you do not see it in your showconfig.aspx, most likely your patch file is not configured correctly. <configuration xmlns:patch="http:...
Chris Auer's user avatar
  • 13.2k
4 votes

Alias are not coming from language specific item version

Here is an explanation. Reason: 'Linked item' field of the 'Alias' template was designed to be shared in all languages. For this, the invariant language is used to retrieve alias items. To make ...
Rohit Chopra's user avatar
  • 1,487
4 votes

Alias are not coming from language specific item version

You need to extend Sitecore.Data.AliasResolver class. You need to modify just this method in this class: public virtual LinkField this[string alias] { get { Error....
Vlad Iobagiu's user avatar
  • 18.8k
4 votes
Accepted

Save multi values to image library with link reference

Well, I've been in the archives ;-) Now I cannot say for sure, the solutions I list here will still be applicable in Sitecore 8. What I can say though, is that Sitecore will add LinkDB references ...
Mark Cassidy's user avatar
  • 25.4k
4 votes
Accepted

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

This is a known issue in SXA 1.5, it was fixed in SXA 1.6 so if you can I highly recommend you to upgrade. Rendering Variants do not work on Overlay items thus you cannot see renderings because they ...
Alan Płócieniak's user avatar
4 votes
Accepted

Creating LinkField from XML

In theory you can extend LinkUrl class and pass the xml instead of the LinkField object like that: using System.Xml; using Sitecore.Data; using Sitecore.Xml.Xsl; namespace My.Assembly.Namespace { ...
Marek Musielak's user avatar
  • 24.2k
4 votes

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

From what I understand, you want to implement custom logic for generation of internal links added by content authors in Rich Text fields. If that's the case, you need to change the logic of ...
Marek Musielak's user avatar
  • 24.2k
4 votes
Accepted

Custom link target in sxa

You can set different types of targets on an anchor tag. Here is this list. So if you select custom, then you can specify these targets in the custom textbox (that enables once you select custom) and ...
Sumit Bhatia's user avatar
  • 5,919
3 votes

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

For starters, you should use the Sitecore.Data.Fields.LinkField class and GetFriendlyUrl(). To rewrite what you have currently: public static string LinkFieldurl(this Item item, ID fieldID) { if (...
George Chang's user avatar
  • 1,255
3 votes
Accepted

RTE Inserting/Rendering Link Appending Text

The Sitecore way to replace the text in a Rich Text field would be to create a custom processor in <renderField> pipeline, insert it before RenderWebEditing to ensure all links in fields are ...
jammykam's user avatar
  • 13.9k
3 votes

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

You can replace the standard link resolve in the Glass Dependency resolver. This is done in the CreateResolver method: public static IDependencyResolver CreateResolver(){ var config = new ...
Michael Edwards's user avatar
3 votes
Accepted

Set Data Attributes for Links to Certain Items

From the way that the issue is described in your post, the actual links that you are trying to intercept are a bit ambiguous. If your links are all from link fields, then the answer is very different ...
Zachary Kniebel's user avatar
3 votes
Accepted

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

Whatever you're doing, I think you're off doing something pretty far removed from established Sitecore Best Practices. That said: string richText = yourItem["rich text field"]; string expandedLink = ...
Mark Cassidy's user avatar
  • 25.4k
3 votes
Accepted

retrieving the url from a link field in a view

There is a helper method on LinkField class called GetFriendlyUrl(). Just cast your field to LinkField and execute the method like: ((LinkField)item.Fields["Link Field Name"]).GetFriendlyUrl()
Marek Musielak's user avatar
  • 24.2k

Only top scored, non community-wiki answers of a minimum length are eligible