Service Portal - Body HTML Script Tag and Server Side Communication in Widget
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2024 07:57 PM
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
SOLUTION >> Depicted Below
I hope this will help others to find solution #Service Portal # Widget #ServerSide-HTML #MVC
Thanks
Biswajyoti Das