Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

redirection within a component

Avatar

Avatar
Boost 5
Level 2
Bhavani_B
Level 2

Likes

7 likes

Total Posts

17 posts

Correct Reply

0 solutions
Top badges earned
Boost 5
Give Back 3
Give Back
Ignite 1
Boost 3
View profile

Avatar
Boost 5
Level 2
Bhavani_B
Level 2

Likes

7 likes

Total Posts

17 posts

Correct Reply

0 solutions
Top badges earned
Boost 5
Give Back 3
Give Back
Ignite 1
Boost 3
View profile
Bhavani_B
Level 2

09-05-2021

Hi folks,

       I have a requirement to redirect the the link within the same page. Example: link to be redirected on the Table/heading within the page.  Any one Please suggest the steps to implement this in AEM.

Thanks in advance

 

Thanks,

Bhavani

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Give Back 100
Level 10
asutosh_jena
Level 10

Likes

551 likes

Total Posts

663 posts

Correct Reply

191 solutions
Top badges earned
Give Back 100
Boost 500
Affirm 100
Ignite 1
Establish
View profile

Avatar
Give Back 100
Level 10
asutosh_jena
Level 10

Likes

551 likes

Total Posts

663 posts

Correct Reply

191 solutions
Top badges earned
Give Back 100
Boost 500
Affirm 100
Ignite 1
Establish
View profile
asutosh_jena
Level 10

09-05-2021

Hi @Bhavani_B 

 

This functionality is called the anchor link or scroll to functionality. You can define an id attribute to the component div with the destination section which can be any type of content such as table/heading/paragraph/image anything. Now when you access the URL with #{id-value} the page will be scrolled to the respective div where it will find a match in the DOM.

 

Let's say I have a content like below:

 

<h2 id="something">Support for our adult patients with ADHD or with moderate to severe B.E.D. during <span class="nowrap">COVID-19</span></h2> in the markup in HTML.

 

Now I if I access the page with www.website.com/mypage#something it will redirect/scroll to the respective section.

 

This Id attribute can be applied to any element/div or section anything in AEM.

 

See the link below:

https://as.nyu.edu/communications/aem-faq/create-anchor.html

 

Thanks!

 

Answers (0)