Suchith
7 years agoAce
Displaying Custom Message in a Specific Category.
Hi.
I have a requirement, I want to display a message on a specific category.
For instance: I have 20 Category in my community, but I have to display message only in one of the category.
Approach:
1) Create a custom component which has Code Logic :
a) Trigger this component if current visited page is a category.
b) Get category id.
c) if category id == "mycategoryid"
d) Display the content, else ignore
2)Add this component to Category Page.
Please let me know how can I implement 1.a and 1.b steps or a better way to implement this requirement.
Thanks
for 1a. You can drectly include custom component to category page or you can add condition like below in your component.
<#if page.name == "CategoryPage">
for 1.b to get category id use below code:
${coreNode.id}