1

We are building components for our Experience Cloud sites. The components need to behave slightly differently based on the site they are used in. To implement the different behaviors, we want to our code (either JavaScript or Apex) to be able to read some custom properties from the site they are running in.

We are using Aura Component attributes (as described here), but this approach does not let us edit the properties from inside the Experience Builder tool. See image below for the ListView2 component.

How do you configure properties so they can be edited from within Experience Builder?

Experience Builder Component

1
  • 1
    For me the most portable mechanism is to simply parameterize the components (adding @api properties) that you set as needed in each site's component usage (as defined in the properties for the components in the various page views). Yes, each component use that needs to vary must be explicitly parameterized, but this doesn't use non-portable values like the network ID or changeable aspects like the URL.
    – Phil W
    Mar 12, 2022 at 22:37

1 Answer 1

3

For this we use design attributes in aura https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/components_config_for_app_builder_design_files.htm

Which will make custom attributes configurable at builder level and exposed to admin, Developer will be defining the logic on the basis of different values of the design attribute in the component, so that admin can change the behavior of component as per the page variation/ site he is using it on

For LWC we can achieve the same by using isexposed attribute , here is the documentation on same https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.reference_configuration_tags

You must log in to answer this question.

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