The CreatorCon Call for Content is officially open! Get started here.

Service Portal - Body HTML Script Tag and Server Side Communication in Widget

dasbiswa
Tera Expert

Dear Service Portal Developers,

 

An interesting solution has been found in order to control <script></script> section in BODY HTML of any widget using the model (Server Side section).

 

A typical requirement was presented to me in past week , they a Chat BOT widget which is used in Portal Landing page needed to be restricted as per User location.

 

There are some countries in core_country table , if any user is tagged to those location >country that Chat BOT interface should not appear.

 

Strangely the UI and the interface was created through an HTTP API call inside the script section in BODY HTML and ng-if and ng-show was not working in the wrapping <div></div> element of the <script></script> tag

 

ISSUE >> Depicted Below

 

dasbiswa_1-1709783309082.png

 

 

SOLUTION >> Depicted Below

dasbiswa_2-1709783622702.png

 

dasbiswa_3-1709783775561.png

I hope this will help others to find solution #Service Portal # Widget #ServerSide-HTML #MVC

 

Thanks

Biswajyoti Das

0 REPLIES 0