Develop helpful button component in AEM 6.3

Avatar

Avatar
Ignite 1
Level 1
prabodh_vk
Level 1

Likes

0 likes

Total Posts

6 posts

Correct reply

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

Avatar
Ignite 1
Level 1
prabodh_vk
Level 1

Likes

0 likes

Total Posts

6 posts

Correct reply

0 solutions
Top badges earned
Ignite 1
Give Back 3
Give Back
View profile
prabodh_vk
Level 1

17-10-2019

Hi,

I have a requirement to create helpful button component which will be used in all the article pages. On clicking the button, we should increment the count for unique users. Once the logged in user click on the button, we should disable the button for that specific user on that page. I'm looking for a best approach to implement this. Could anyone throw some light on this please.

Thanks in advance.

Replies

Avatar

Avatar
Ignite 1
MVP
Ankur_Khare
MVP

Likes

159 likes

Total Posts

370 posts

Correct reply

58 solutions
Top badges earned
Ignite 1
Validate 10
Validate 1
Give Back 50
Give Back 5
View profile

Avatar
Ignite 1
MVP
Ankur_Khare
MVP

Likes

159 likes

Total Posts

370 posts

Correct reply

58 solutions
Top badges earned
Ignite 1
Validate 10
Validate 1
Give Back 50
Give Back 5
View profile
Ankur_Khare
MVP

17-10-2019

Refer OOB rating component.

You can use the similar logic to implement this functionality.

Avatar

Avatar
Give Back 5
Level 2
scottm91515441
Level 2

Likes

5 likes

Total Posts

35 posts

Correct reply

5 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back 10
Give Back
Boost 5
View profile

Avatar
Give Back 5
Level 2
scottm91515441
Level 2

Likes

5 likes

Total Posts

35 posts

Correct reply

5 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back 10
Give Back
Boost 5
View profile
scottm91515441
Level 2

17-10-2019

I would use a sling model for this requirement.

Avatar

Avatar
Ignite 1
Level 1
prabodh_vk
Level 1

Likes

0 likes

Total Posts

6 posts

Correct reply

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

Avatar
Ignite 1
Level 1
prabodh_vk
Level 1

Likes

0 likes

Total Posts

6 posts

Correct reply

0 solutions
Top badges earned
Ignite 1
Give Back 3
Give Back
View profile
prabodh_vk
Level 1

17-10-2019

Is it part of communities? Could you please provide me the path where I can find Rating component?

Avatar

Avatar
Ignite 1
Level 1
prabodh_vk
Level 1

Likes

0 likes

Total Posts

6 posts

Correct reply

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

Avatar
Ignite 1
Level 1
prabodh_vk
Level 1

Likes

0 likes

Total Posts

6 posts

Correct reply

0 solutions
Top badges earned
Ignite 1
Give Back 3
Give Back
View profile
prabodh_vk
Level 1

17-10-2019

Scott, we do not have the users stored in AEM. So, my main concern is with respect to storing the user info(unique identifier) as we have a lot of users. We need to store the user info to determine if a user has already liked the article. Should we use an external DB to store this data (user info specific to an article).

Avatar

Avatar
Ignite 1
MVP
Ankur_Khare
MVP

Likes

159 likes

Total Posts

370 posts

Correct reply

58 solutions
Top badges earned
Ignite 1
Validate 10
Validate 1
Give Back 50
Give Back 5
View profile

Avatar
Ignite 1
MVP
Ankur_Khare
MVP

Likes

159 likes

Total Posts

370 posts

Correct reply

58 solutions
Top badges earned
Ignite 1
Validate 10
Validate 1
Give Back 50
Give Back 5
View profile
Ankur_Khare
MVP

17-10-2019

Previously when we used rating component it was written in jsp in cq 5.6.

Now i think you can refer this component-

Using Ratings

/libs/social/tally/components/hbs/rating

Avatar

Avatar
Ignite 1
MVP
Ankur_Khare
MVP

Likes

159 likes

Total Posts

370 posts

Correct reply

58 solutions
Top badges earned
Ignite 1
Validate 10
Validate 1
Give Back 50
Give Back 5
View profile

Avatar
Ignite 1
MVP
Ankur_Khare
MVP

Likes

159 likes

Total Posts

370 posts

Correct reply

58 solutions
Top badges earned
Ignite 1
Validate 10
Validate 1
Give Back 50
Give Back 5
View profile
Ankur_Khare
MVP

23-10-2019

were u able to use OOB rating component logic?

Avatar

Avatar
Ignite 1
Level 1
prabodh_vk
Level 1

Likes

0 likes

Total Posts

6 posts

Correct reply

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

Avatar
Ignite 1
Level 1
prabodh_vk
Level 1

Likes

0 likes

Total Posts

6 posts

Correct reply

0 solutions
Top badges earned
Ignite 1
Give Back 3
Give Back
View profile
prabodh_vk
Level 1

19-11-2019

No, we have not used OOTB Rating component. I was mainly looking for suggestions around storage as we do not have the user data stored in AEM. Now we have decided to use an external DB for storing the unique user identifier along with article page path.