Way to conditionally hide or show a Script tag in Html using Boolean value fetched from Config.
Hi,
Can i implement a way to enable or disable a <script> tag to add it to HTML with the Boolean value fetched from config file.
So, I am getting the boolean value from config file by checkbox field.
<sly data-sly-use.osgiconfig="com.app.common.config.osgi.ConfigService"></sly>
<sly> Instant Page Load is checked : <b>${osgiconfig.instantPageChecked}</b></p></sly>
<script src="//instant.page/5.1.0" type="module" integrity="sha384-by67kQnR+pyfy8yWP4kPO12fHKRLHZPfEsiSXR8u2IKcTdxD805MGUXBzVPnkLHw"></script>
so, if the checkbox is enabled and true the script tag should load.
if disabled and false the script should not load in html.
Any reference or inputs on this.
Thanks.