This question has been flagged

Hello guys,

i'm stuck with this problem.
I had 2 different modules that make different thinks and all two need the tag for Safari iOS WebApp for adding web page as native APP:

<link rel="apple-touch-icon" href="ic_launcher-web.png"/>
<meta
name="apple-mobile-web-app-title" content="Title"/>
<meta
name="apple-mobile-web-app-capable" content="yes"/>

But the problem is that all two gets loaded because i inherit web.assets_frontend and add them into it that will add them into <head>.

It's possible to load dynamically the assets or css and js resources?
Something like.. load this templates when the relative template of web pages gets rendered by controller?

Only add this to <head> when template 1 is rendered

<template id="for_app_1">    
    <link rel="apple-touch-icon" href="ic_launcher-web1.png"/>    
    <meta name="apple-mobile-web-app-title" content="Title 1"/>    
    <meta name="apple-mobile-web-app-capable" content="yes"/>
</template>

Only add this to <head> when template 2 is rendered
<template id="for_app_2">    
    <link rel="apple-touch-icon" href="ic_launcher-web2.png"/>  
    <meta name="apple-mobile-web-app-title" content="Title 2"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
</template>

Avatar
Discard