1

I'm working on creating a custom Communities Theme Layout. I must admit, I'm a bit confused on how placing an aura:attribute by the name of profileMenu adds a property of the same name to the value provider, v.profileMenu. The only thing I can conclude is it's already an attribute on forceCommunity:themeLayout, which I am inheriting, and by placing it in my component, it becomes accessible. I also assume that the name is immutable.

If my assumptions are correct, then there may be many more of these named components I can access/inherit.

Does anyone have a listing of all of the Communities components I can use my layouts and/or Lightning Compoments?

If a full list isn't available, does anyone know what how I can access the standard Logo image component, which one configures in the Branding section on Communities?

0

2 Answers 2

3

You can reference the community branding logo through design tokens. Just need to reference the "brandLogoImage" in your token bundle, and then use it in your component Style.

The Guide on Styling with Design Tokens should provide the necessary details on doing so.

You need to create a token Bundle named defaultTokens that extends as follows:

<aura:tokens extends="force:base">
    <aura:token name="tokenName" value='' />
</aura:tokens>

and add the token name you want to reference in your theme layout or lightning component.

You can then reference it in your bundle's Style as follows:

.THIS .css-scope{
    someAttribute: token(tokenName);
}

Available communtiy tokens are referenced here

you can also use forceCommunity:base, both work and the documentation does recommend extending forceCommunity:base for community tokens, however, doesnt seem to be enforced at the moment.

2
  • To use the brandLogoImage, one must extend forceCommunity:base not force:base. Feb 2, 2018 at 17:11
  • can but not must, both work
    – glls
    Feb 2, 2018 at 18:32
2

You can use the features found in Use Lightning Components in Community Builder and Standard Design Tokens for Communities, both found in the Lightning Components Developer Guide.

I'm not going to include the full list, because these may change over time, but if the links happen to invalidate over time, just use your favorite search engine for the "Salesforce Lightning Components Developer Guide" and follow the menu items.

Admittedly, the available interfaces are spread over several pages, so you may need to spend some time looking through the documentation to find what you're looking for.

You must log in to answer this question.

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