To display Custom announcement only on one Topic page.

Community Alums
Not applicable

Hi, How can I configure an announcement (message) to be displayed exclusively on a specific sub-topic page within a taxonomy? 

1 ACCEPTED SOLUTION

Community Alums
Not applicable

Finally, I found a solution. I will leave it here for the dear developers.

I created a widget and added that widget to the taxonomy page using the page designer.

 

html

<div class="alert" ng-if="c.showAlert">
<p>WRITE YOU MESSAGE HERE.</p>
</div>

Clint side script

api.controller=function() {
/* widget controller */
var c = this;
c.showAlert = c.data.topicId == 'put topicID from your page';
};

Server side

(function() {
/* populate the 'data' object */
/* e.g., data.table = $sp.getValue('table'); */
data.topicId = $sp.getParameter("topic_id");
})();

CSS
.alert {
margin:14px;
background-color: ##fdda16;
color: black;
}

 

View solution in original post

8 REPLIES 8

bubuprasadswain
Tera Guru

Hi,

Step1: Add the Announcement Widget to Taxonomy page using Page Designer.
Step2: Create a Rich Text Content with your desired message.
Step3: While publishing the content select the taxonomy page

                  ->then select Announcement Widget

                 -> then select the taxonomy

                 -> then select the Topic which you want to publish

bubuprasadswain_0-1712737749880.png


Regards,

Bubuprasad

Thank you for your quick response. Where do I Create a Rich Text Content? Could you please guide me? 

Hi, Thank you for your quick response. Where do I Create a Rich Text Content? Could you please guide me?