Part 22: Nested comment for knowledge article
February 25, 2021
45 sec read
Navigate to knowledge article page and Add container for nested comments section
Open on knowledge article page from UI Builder. From the Content section, After the Container 2 . Click (+) toadd component to the container. In search box, type Container and select Add . Keep the default layout
Click (+) toadd component to the container. In search box, type Comments andadd Nested Comments.
Add Data broker to get Knowledge Article Comments
Create a Data resource Click + Add Search for keyword “Knowledge” From the Server Data section, select Retrieve knowledge comments Click Add In the configuration section, Fill out the fields belowArticle ID – @context.props.sysId
Observe the JSON on the right side of the screen where it shows the result for the Data broker This should be blank for now as we do not have any comments for this article
Update following propertiesComments : @data.retrieve_knowledge_comments_1.knowledgeComments
Actions: Add the following code snippet
[{
"id":"delete",
"label":"Delete",
"icon":"trash-outline",
"ariaLabel":"Delete Comment"
}]
Great!! We have successfully added the comments component and hooked it to show article Comments. In the next post, we will hook the event to this component to save the comments.
Part 22: Nested comment for knowledge article
45 sec read
Navigate to knowledge article page and Add container for nested comments section
Add Nested comments component to this container
Add Data broker to get Knowledge Article Comments
@context.props.sysId
Update Nested Comments component Configurations
@data.retrieve_knowledge_comments_1.knowledgeComments
Great!! We have successfully added the comments component and hooked it to show article Comments. In the next post, we will hook the event to this component to save the comments.