Opticon Stockholm is on Tuesday September 10th, hope to see you there!
Opticon Stockholm is on Tuesday September 10th, hope to see you there!
Hi ZZ,
Actually you can do something like this by building a new custom Url with Id attribute and add new dojo js for new one. You can see Url property and dojo js for Url property to build new one based on that.
HI Binh,
Thanks for your input. Do you have any example on how to build it via dojo js ?
Hi ZZ,
I have just found that you do not need to build your own. You can add more properties into link item via the package Geta.Optimizely.GenericLinks from Geta. You can see this link for more detail https://github.com/Geta/geta-optimizely-genericlinks
Thanks for that. Do you know how can I achieve same when adding link via TinyMCE ? >
I am already inheriting from LinkData to have thumbnails, but when I add LinkId field to this it doesn't shows up ->
public class ThumbnailLinkData : LinkData
{
[Display(Name = "Thumbnail image", Order = 0)]
[UIHint("image")]
public virtual ContentReference Thumbnail
{
get => GetAttribute(ContentReference.Parse);
set => SetAttribute(value, (v) => v.ToString());
}
// Not working
[Display(Name = "Link Id", Order = 0)]
public virtual string LinkId
{
get => GetAttribute((value) => value.ToString());
set => SetAttribute(value, (v) => v.ToString());
}
}
Hi ZZ,
Actually, this implementation works directly with property with type such as:
public virtual ThumbnailLinkData CustomLink { get; set; }
Or
public virtual LinkDataCollection<ThumbnailLinkData>? ThumbnailLinkCollection { get; set; }
I think the link in tinymce is default link item. It is built as a tinymce plugin to allow to set default Optimizely link item control. If you want to apply the change in tinymce then I suggest that you could add new tinymce plugin like that.
Here is the link that you can look to know how to create a new tinymce plug-in https://tedgustaf.com/blog/2022/adding-custom-tinymce-plugin-to-the-html-editor-in-optimizely-cms/
Hi,
We want to track our links and for that we need ids to be set on links generates via EPiServer CMS. There are two ways by which we add links. One is via TinyMCE and other is via EPiServer field like Url property on page/block.
How can we add id to our links ? ->
e.g ->
EPiServer.CMS.TinyMce" Version="4.7.1