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 ...
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 ...
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/...
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={...
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 ...
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 -...
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="...
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" ...
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="" />
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="" ...
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 ...
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(...
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 ...
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
...
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(...
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. ...
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:...
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 ...
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....
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 ...
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 ...
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
{
...
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 ...
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 ...
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 (...
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 ...
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 ...
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 ...
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 = ...
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()
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
links × 83link-manager × 14
sxa × 8
media-library × 8
richtext-editor × 8
glass-mapper × 7
sitecore-client × 5
content-editor × 4
presentation × 4
mvc × 4
multilingual × 4
experience-editor × 3
multisite × 3
fieldtype × 3
redirect × 3
powershell-extensions × 2
sitecore-api × 2
templates × 2
javascript × 2
link-database × 2
seo × 2
field × 2
jss × 1
wffm × 1
configuration × 1