0

I have to add a button that says "Ask a question" which will redirect me to another page in the customer account portal. However, I cannot find "Ask a question" component in customer account template as it is only available under "Napili Template". Is there a way to get it from the other templates or do I have to build a new component?

0

1 Answer 1

1

The ask a question button simply opened a modal which allowd users to post FeedItem QuestionPosts to the community.

enter image description here

If you want a button that redirects to X page with a label "Ask a Question" you will have to create your component (which is very straightforward and can easily be achieved)

for example:

component.cmp

<lightning:button variant="brand" label="Ask A Question" onclick="{! c.handleRedirect}" />

component.js

handleRedirect: function (component, event, helper) {
    var urlEvent = $A.get("e.force:navigateToURL");
    urlEvent.setParams({
      "url": "/CommunityUrl"
    });
    urlEvent.fire();
}
0

You must log in to answer this question.

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