Did someone try to use LWC in Communities?

I created component to dynamically render Knowledge articles based on provided Topic by passing Topic.Name as Design Attribute.

It works in Builder, but when I publish Community and try to debug values for the design parameter it always returns null.

        <targetConfig targets="lightningCommunity__Default">
            <property name="topic" type="String" default="test"/>
    topic = '';

    renderedCallback() {
        console.log(`topic = ${this.topic}`);

Any advice is appreciated because I don't really want to update everything with Aura components as a wrapper.

EDIT: The issue is that topic doesn't have the correct value when I set it in Community Builder. enter image description here

  • Could you try {!recordName}? Do your guest users have the appropriate permissions to view the topic?
    – Kenan
    Jun 7 '19 at 20:56
  • It is working as expected and showing values after publishing. Jun 8 '19 at 4:25
  • @kenan Problem is that I have in console 'topic = '
    – ytiq
    Jun 9 '19 at 11:18

Don't know what was the issue.

I raised the case, updated my code to aura and when I actually needed to present the issue to the support - LWC started to work.

Weird staff


Salesforce finally fixed the issue and you can use variables in LWC now

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.