Expand my Community achievements bar.

SOLVED

How to integrate AEM 6.1 communities with an existing site?

Avatar

Level 2

Use case scenario:

I have a site which has a "Product Details" page.

We need to use the ratings and Review component in it.

For that we will need to set up user profiles which can provide reviews, i.e. we will have to integrate AEM communities login and registration with our existing site.

Can anyone please help ?

Thanks

Souvik

1 Accepted Solution

Avatar

Correct answer by
Level 3

So we recently did a POC where we integrated OOTB communities components into existing templates. This is easy, because these components are same as other OOTB components. You just need to customize as per your requirements and handle the look and feel.

We tried this out with Blogs and Comments but never customized Login component. But this should be doable, as login also exists as a component: /libs/social/console/components/hbs/login/

Though using communities sites provides all these components enabled and even the content stored can be easily plugged out whenever required. But for your requirement, I feel it has to be done using old ways, primarily because Detail page already exists and cannot be moved into community site structure.

Thanks

Dipti

View solution in original post

10 Replies

Avatar

Level 10

See the AEM communities documentation here:

Getting Started with AEM Communities for Enablement

Also - see the Ask the AEM Communities experts that may help too:

ATACE 5 24 16 Deep Dive into AEM Communities

Avatar

Level 2

Hi

Thanks for the help

All these links speak about how to create a new community site from scratch.

But here we need to integrate communities with an existing site which has not been created using the community wizard.

Avatar

Level 3

Hi Souvik

The rating and review components, are these existing custom components or are you planning to use the ones provided OOTB with AEM communities?

Thanks

Dipti

Avatar

Level 2

We are planning to use the OOTB components

Avatar

Correct answer by
Level 3

So we recently did a POC where we integrated OOTB communities components into existing templates. This is easy, because these components are same as other OOTB components. You just need to customize as per your requirements and handle the look and feel.

We tried this out with Blogs and Comments but never customized Login component. But this should be doable, as login also exists as a component: /libs/social/console/components/hbs/login/

Though using communities sites provides all these components enabled and even the content stored can be easily plugged out whenever required. But for your requirement, I feel it has to be done using old ways, primarily because Detail page already exists and cannot be moved into community site structure.

Thanks

Dipti

Avatar

Level 2

Hi Dipti,

Thanks a lot for this info

One more question that is troubling us is that, reviews are only allowed in publish mode and anonymous review is not allowed.

user has to be logged in using his/her community id.

I think you must have faced similar situations with the Comments component.

How to handle this?

And how did you create users who can comment in publish instance?

Avatar

Level 3

So the architecture of Communities or any UGC content revolves around Publish instance only. It also depends on which SRP you are using, though it is recommended not to use JSRP for sure.

Anyhow for enabling content entry for anonymous users for any communities component, there is a setting available in OOTB AEM Communities framework (screenshot attached). This removes the need for login to AEM. But to access Publish server as anonymous user, please give Read rights to 'anonymous' user too.

settings.png

In all components, there are custom properties available too. So if you treat them as a normal component, you can check what all properties are available for customization. Let me know if you need help on this, I can extract screenshots for comments component for reference.

P.S. - The POC on which I worked was on AEM 6.2. So maybe few configurations might be missing in 6.1's version.

Avatar

Level 2

Hi Dipti,

Actually the site in which we need to use this review component has not been created using the AEM communitiy site creation wizard.

This is the main challenge that we are facing.

Since our site has not been created using the community site creation wizard we cannot give the user permissions you mentioned in the screenshot.

Can u help on this?

Thanks

Souvik

Avatar

Level 3

Understood Souvik. Though I haven't done this in AEM 6.2 but I faced similar issue in CQ5.4 (approx 5 years back). If I remember correctly, giving relevant access rights to Anonymous user should resolve this issue.

Where is your UGC getting stored? In our case we were storing it in JCR repository, so giving write access to '/content/usergenerated/.....' node helped. We were using reverse replication and hence ran into many issues but we could test it on Author too. Though as I mentioned before, UGC is meant to be entered via Publishers.

Not sure if I have been able to answer your query correctly.

Avatar

Level 3

HI @souvikcmusic

There could be two options for you to use review component.

If you want to allow anonymous user to rate and review your product, you need to develop your own components because java class written for OOTB review components has a check if user is anonymous or not. If user is anonymous, it does not allow user to post a review. You can verify this in the jar at '/libs/system/install/cq-social-review-1.4.4.jar' . So you can write your own logic in the custom component.

2nd option could be to use OOTB login component present at '/libs/foundation/components/login' so that user can login and rate the product.