3

We have a custom aura component on Community and we would like to build logic based on the Audience set for the page where the component is. Is it possible to query the current Audience within the component controller?

1 Answer 1

0

As far as I know, page audience settings cannot be "queried" from an Aura component.

But there are some alternatives :

  1. Assign audience to an aura component and control visibility of component based on audience assigned
    Reference: Assign an Audience to a Component

enter image description here

  1. Use design resource to expose custom attributes in Experience Builder for the component and control the content of the Aura component based on the attribute values and/or audience assigned to the component. Depending on the use case, multiple Aura components can be added on the page but only one component will be displayed when audience and/or custom attributes apply.
    Reference : Expose Component Attributes in Experience Builder

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .