Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
3381 Visualizzazioni

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
0
dic 18
6254
0
ott 19
2160
0
gen 18
2538
1
dic 17
4919
1
feb 19
10716