We are using DXA 2.2.3 and have the following mappings:
[ExcludeFromCodeCoverage]
[SemanticEntity(EntityName = "Link", Prefix = "l")]
public class Link : EntityModel
{
[Include]
[SemanticProperty("l:internalLink")]
[SemanticProperty("l:externalLink")]
public string Url { get; set; }
...
}
The Url property is resolved to:
/content-management/sdl-tridion/sdl-tridion-sites/
But I would like to add an Id of a Component which it is linked to as an url fragment/hash, so for example I would like to have an url
/content-management/sdl-tridion/sdl-tridion-sites/#93730
In addition, this fragment should appear in the resolved link only in case the linked Component is based or not based on a certain Schema. So I need to check the Schema Id and then consider adding an anchor to a link.
What is a proper way to handle such a case? Any solution on web app side?