Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
3285 Vizualizări

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>

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
0
dec. 18
6154
0
oct. 19
2090
0
ian. 18
2510
1
dec. 17
4781
1
feb. 19
10599