


How do you create Anchor Link in AEM 6.4?
Views
Replies
Sign in to like this content
Total Likes
Hi @Clarence_Bunch
Do you mean by jump links/hash links? i.e. something with #abcd in the URL and it will take you to certain position in the website?
If this is the ask then, you can configure the id attribute to any of the component that you have on your website so that the markup will have an attribute in DOM such as:
<div id="abcd" class="Something">Some Content</div>
Now in your RTE component, you can configure the link as #(id) i.e. #abcd in this case and save the dialog. Now whenever you will click on the Some Content link, it will take you to the destination hash link.
Let me know if there is any other requirement that I might have misunderstood.
Thanks!
Hi @Clarence_Bunch
Do you mean by jump links/hash links? i.e. something with #abcd in the URL and it will take you to certain position in the website?
If this is the ask then, you can configure the id attribute to any of the component that you have on your website so that the markup will have an attribute in DOM such as:
<div id="abcd" class="Something">Some Content</div>
Now in your RTE component, you can configure the link as #(id) i.e. #abcd in this case and save the dialog. Now whenever you will click on the Some Content link, it will take you to the destination hash link.
Let me know if there is any other requirement that I might have misunderstood.
Thanks!
Hi, To create anchor functionality -
1. Create an anchor component for Target jump, that asks for an id and create an empty div only with id.
2. Update/extend the link component and add an option to provide anchor text(trigger point) and from java/backend or from frontend append an anchor to link(link#anchor)
From an email. I want to link to a specific image or text in the AEM page. I don't have the anchor addin. How can you accomplish this from the RTE?
@Clarence_Bunch You can configure the link of the destination page with #link to the image or text which will have an id associated with it.
So the link in RTE on the email will be something like below:
now the id attribute on the destination page image/text will be having the value as "someid".
Thanks!
How do we add or edit the id from an authoring perspective if we don't have access to the HTML.