How does navigatetoURL works in community Page.We have built a custom lightning component to display list of articles .TO redirect the article to the article page how to does navogatetoURL works in community where the community URL will be /s/article/artilce-urlname
({
getArticles1: function(component) {
var action = component.get("c.getArticles");
action.setStorable();
action.setCallback(this, function(response) {
var state = response.getState();
if (state === "SUCCESS") {
component.set("v.articleview", response.getReturnValue());
}
});
$A.enqueueAction(action);
}
});
navigate: function(cmp, event, helper) {
console.log("test1")
cmp.find("navService").navigate({
type: "standard__knowledgeArticlePage",
attributes: {
"articleType": "How_To__kav",
"urlName": "/article/"+{urlName}
},
}
)
}
<aura:iteration var ="articleview" items="{!v.articleview}">
<div>
<p class="astyle"><a class="slds-text-color--default" onclick="{!c.navigate}" >{!articleview.title}</a></p>
</div>
navigatetoURL
functionality, do you have URl column in your custom lightning component to display list of articles?