The Indicators Laboratory - Mobility Observatory in Catalonia (OMC)
The Indicators Laboratory
Create yours indicators
This tool will allow you to create custom indicators from your data available in the Observatory .For this, we propose 2 options:
-
Follow a didactic template that will guide you step by step
-
Start from scratch from a blank template
Use our examples
If you prefer to start from predefined templates, you can customise the examples that we make available to you, modifying them or adding new data, which you can also download and share. Below is a list of the available examples classified by theme (mobility of persons, mobility of goods, economic situation) or by territorial area:
Mobility of people
Coming soon
Mobility of goods
Coming soon
Mobility by territory
Coming soon
Short-term indicators
Coming soon
Select your data sources
Socioeconomic data
An error occurred while processing the template.
The following has evaluated to null or missing:
==> friendlyURLs[themeDisplay.getLanguageId()] [in template "20097#20123#489200" at line 29, column 14]
----
Tip: It's the final [] step that caused this error, not those before it.
----
Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----
----
FTL stack trace ("~" means nesting-related):
- Failed at: #assign url = friendlyURLs[themeDispl... [in template "20097#20123#489200" at line 29, column 1]
----
1<#assign journalArticleId = .vars['reserved-article-id'].data>
2<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") />
3<#assign journalArticleResourceLocalServiceUtil = serviceLocator.findService("com.liferay.journal.service.JournalArticleResourceLocalService")>
4<#assign assetCategoryLocalServiceUtil = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService")>
5<#assign assetVocabularyLocalServiceUtil = serviceLocator.findService("com.liferay.asset.kernel.service.AssetVocabularyLocalService")>
6
7<#assign articleResourcePK = journalArticleResourceLocalServiceUtil.getArticleResourcePrimKey(groupId, journalArticleId)/>
8<#assign categoryList=assetCategoryLocalServiceUtil.getCategories("com.liferay.journal.model.JournalArticle",articleResourcePK) >
9<#assign asset = assetEntryLocalService.getEntry('com.liferay.journal.model.JournalArticle', articleResourcePK) >
10<#if (Título?exists) && (Título.getData()?? && Título.getData() != "")>
11<#assign titulo = Título.getData()>
12</#if>
13<#if (themeDisplay.getLanguageId() == 'es_ES')>
14 <#assign indicador="Ver indicador"/>
15 <#assign copiado='Copiado'/>
16
17</#if>
18<#if (themeDisplay.getLanguageId() == 'ca_ES')>
19 <#assign indicador="Veure indicador"/>
20 <#assign copiado='Copiat'/>
21</#if>
22<#if (themeDisplay.getLanguageId() == 'en_US')>
23 <#assign indicador="View indicator"/>
24 <#assign copiado='Copy'/>
25</#if>
26
27<#list asset.getCategories() as category>
28<#assign catId = category.categoryId />
29<#assign url=friendlyURLs[themeDisplay.getLanguageId()]+'?filterCategoryIds='+catId />
30<div class="aqui" style="display:none">${url}</div>
31 <script>
32
33 function clickf(){
34 var dat= document.URL.split('/')
35 dat=dat[dat.length-1]
36 // location.href="${friendlyURLs[themeDisplay.getLanguageId()]!''}"
37 if( localStorage.getItem('urlMigas')!=undefined){
38 localStorage.removeItem('urlMigas');
39 localStorage.setItem('urlMigas', dat);
40
41 }else{
42 localStorage.setItem('urlMigas', dat);
43 }
44 console.log('${category.name}')
45 }
46 var urlDat="${friendlyURLs[themeDisplay.getLanguageId()]!""}"
47 urlDat=urlDat.split('/')
48 urlDat=urlDat[urlDat.length-1]
49 var idioma='${themeDisplay.getLanguageId()}'
50 idioma=idioma.split('_')[0]
51 var idCat = '${category.categoryId}'
52 var urldata=urlDat+"?filterCategoryIds="+'${catId}'
53 // console.log($('.interior[id-tab="'+idCat+'"]').html())
54 //$('.interior').find('.listado-tematica[id-tab="'+idCat+'"]').addClass("este")
55 $('.interior[id-tab="'+idCat+'"] ul').append("<li><button onclick='clickf()' class='btn-none align-items-end item-list-desp'> <a href='${friendlyURLs[themeDisplay.getLanguageId()]!''}?filterCategoryIds=${category.categoryId}' class='decoration'><div class='align-items-center d-flex flex-wrap'> <strong class='mr-2'>${titulo}:</strong> </div></a><div class='links'><!--<a href='${friendlyURLs[themeDisplay.getLanguageId()]!''}?filterCategoryIds=${category.categoryId}' class='link-arrow pl-2' > ${indicador}</a>--><button class='btn-none i link-arrow pl-2' onclick='window.open(`${friendlyURLs[themeDisplay.getLanguageId()]!''}?filterCategoryIds=${category.categoryId}`,`_blank`)'>${indicador}</button><button class='btn-none icon-data-studio'onclick='getlink(`http://5.175.40.126/api/Atm?graph="+urlDat+"?country="+idioma+"`)' class='icon-datastudio'><i title='${titulo}-dat' class='fa fa-flask' aria-hidden='true' aria-label='${titulo}-dat'></i><span class='visually-hidden'>${titulo}-dat</span></button></div></button></li>")
56 function getlink(element) {
57 var aux = document.createElement("input");
58 aux.setAttribute("value", element);
59 document.body.appendChild(aux);
60 aux.select();
61 document.execCommand("copy");
62 document.body.removeChild(aux);
63 $(event.target).parent().append('<p class="copy-style">${copiado}</p>')
64
65 // alert("URL copiada al portapapeles");
66 }
67
68
69 </script>
70</#list>
71<style>
72.btn-none{
73 background: none!important;
74 border: none!important;
75}
76.visually-hidden {
77 position: absolute;
78 width: 1px;
79 height: 1px;
80 margin: -1px;
81 padding: 0;
82 overflow: hidden;
83 clip: rect(0, 0, 0, 0);
84 border: 0;
85}
86.sr-only {
87 position: absolute;
88 width: 1px;
89 height: 1px;
90 margin: -1px;
91 padding: 0;
92 overflow: hidden;
93 clip: rect(0, 0, 0, 0);
94 border: 0;
95}
96.links {
97 position:relative;
98 min-width: 210px;
99}
100.copy-style{
101 background: #F6AE2D;
102 color:white;
103 padding:5px;
104 position: absolute;
105 right: 0;
106 top: -25px;
107 display: inline-block;
108 padding: 12px;
109 border-radius: 9px;
110 font-size: 14px;
111 opacity:0;
112 animation: ocult 3s linear;
113}
114.align-items-end{
115 cursor:pointer;
116}
117.decoration{
118 text-decoration: none!important;
119}
120.icon-data-studio,
121.icon-data-studio:hover{
122 border: 1px solid #F6AE2D;
123 border-radius: 15px;
124 padding: 5px 10px;
125 font-size: 20px;
126 width: 30px;
127 display: flex;
128 text-align: center;
129 line-height: 0;
130 margin: 0 5px;
131 justify-content: center;
132 align-items: center;
133 color:#F6AE2D;
134 margin-left: 20px;
135 text-decoration:none;
136}
137.links{
138 display: flex;
139 align-items: center;
140 justify-content: center;
141}
142@keyframes ocult {
143 0% {
144 opacity: 1;
145 }
146
147 100% {
148 opacity: 0;
149 }
150}
151
152</style>
An error occurred while processing the template.
The following has evaluated to null or missing:
==> friendlyURLs[themeDisplay.getLanguageId()] [in template "20097#20123#489200" at line 29, column 14]
----
Tip: It's the final [] step that caused this error, not those before it.
----
Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----
----
FTL stack trace ("~" means nesting-related):
- Failed at: #assign url = friendlyURLs[themeDispl... [in template "20097#20123#489200" at line 29, column 1]
----
1<#assign journalArticleId = .vars['reserved-article-id'].data>
2<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") />
3<#assign journalArticleResourceLocalServiceUtil = serviceLocator.findService("com.liferay.journal.service.JournalArticleResourceLocalService")>
4<#assign assetCategoryLocalServiceUtil = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService")>
5<#assign assetVocabularyLocalServiceUtil = serviceLocator.findService("com.liferay.asset.kernel.service.AssetVocabularyLocalService")>
6
7<#assign articleResourcePK = journalArticleResourceLocalServiceUtil.getArticleResourcePrimKey(groupId, journalArticleId)/>
8<#assign categoryList=assetCategoryLocalServiceUtil.getCategories("com.liferay.journal.model.JournalArticle",articleResourcePK) >
9<#assign asset = assetEntryLocalService.getEntry('com.liferay.journal.model.JournalArticle', articleResourcePK) >
10<#if (Título?exists) && (Título.getData()?? && Título.getData() != "")>
11<#assign titulo = Título.getData()>
12</#if>
13<#if (themeDisplay.getLanguageId() == 'es_ES')>
14 <#assign indicador="Ver indicador"/>
15 <#assign copiado='Copiado'/>
16
17</#if>
18<#if (themeDisplay.getLanguageId() == 'ca_ES')>
19 <#assign indicador="Veure indicador"/>
20 <#assign copiado='Copiat'/>
21</#if>
22<#if (themeDisplay.getLanguageId() == 'en_US')>
23 <#assign indicador="View indicator"/>
24 <#assign copiado='Copy'/>
25</#if>
26
27<#list asset.getCategories() as category>
28<#assign catId = category.categoryId />
29<#assign url=friendlyURLs[themeDisplay.getLanguageId()]+'?filterCategoryIds='+catId />
30<div class="aqui" style="display:none">${url}</div>
31 <script>
32
33 function clickf(){
34 var dat= document.URL.split('/')
35 dat=dat[dat.length-1]
36 // location.href="${friendlyURLs[themeDisplay.getLanguageId()]!''}"
37 if( localStorage.getItem('urlMigas')!=undefined){
38 localStorage.removeItem('urlMigas');
39 localStorage.setItem('urlMigas', dat);
40
41 }else{
42 localStorage.setItem('urlMigas', dat);
43 }
44 console.log('${category.name}')
45 }
46 var urlDat="${friendlyURLs[themeDisplay.getLanguageId()]!""}"
47 urlDat=urlDat.split('/')
48 urlDat=urlDat[urlDat.length-1]
49 var idioma='${themeDisplay.getLanguageId()}'
50 idioma=idioma.split('_')[0]
51 var idCat = '${category.categoryId}'
52 var urldata=urlDat+"?filterCategoryIds="+'${catId}'
53 // console.log($('.interior[id-tab="'+idCat+'"]').html())
54 //$('.interior').find('.listado-tematica[id-tab="'+idCat+'"]').addClass("este")
55 $('.interior[id-tab="'+idCat+'"] ul').append("<li><button onclick='clickf()' class='btn-none align-items-end item-list-desp'> <a href='${friendlyURLs[themeDisplay.getLanguageId()]!''}?filterCategoryIds=${category.categoryId}' class='decoration'><div class='align-items-center d-flex flex-wrap'> <strong class='mr-2'>${titulo}:</strong> </div></a><div class='links'><!--<a href='${friendlyURLs[themeDisplay.getLanguageId()]!''}?filterCategoryIds=${category.categoryId}' class='link-arrow pl-2' > ${indicador}</a>--><button class='btn-none i link-arrow pl-2' onclick='window.open(`${friendlyURLs[themeDisplay.getLanguageId()]!''}?filterCategoryIds=${category.categoryId}`,`_blank`)'>${indicador}</button><button class='btn-none icon-data-studio'onclick='getlink(`http://5.175.40.126/api/Atm?graph="+urlDat+"?country="+idioma+"`)' class='icon-datastudio'><i title='${titulo}-dat' class='fa fa-flask' aria-hidden='true' aria-label='${titulo}-dat'></i><span class='visually-hidden'>${titulo}-dat</span></button></div></button></li>")
56 function getlink(element) {
57 var aux = document.createElement("input");
58 aux.setAttribute("value", element);
59 document.body.appendChild(aux);
60 aux.select();
61 document.execCommand("copy");
62 document.body.removeChild(aux);
63 $(event.target).parent().append('<p class="copy-style">${copiado}</p>')
64
65 // alert("URL copiada al portapapeles");
66 }
67
68
69 </script>
70</#list>
71<style>
72.btn-none{
73 background: none!important;
74 border: none!important;
75}
76.visually-hidden {
77 position: absolute;
78 width: 1px;
79 height: 1px;
80 margin: -1px;
81 padding: 0;
82 overflow: hidden;
83 clip: rect(0, 0, 0, 0);
84 border: 0;
85}
86.sr-only {
87 position: absolute;
88 width: 1px;
89 height: 1px;
90 margin: -1px;
91 padding: 0;
92 overflow: hidden;
93 clip: rect(0, 0, 0, 0);
94 border: 0;
95}
96.links {
97 position:relative;
98 min-width: 210px;
99}
100.copy-style{
101 background: #F6AE2D;
102 color:white;
103 padding:5px;
104 position: absolute;
105 right: 0;
106 top: -25px;
107 display: inline-block;
108 padding: 12px;
109 border-radius: 9px;
110 font-size: 14px;
111 opacity:0;
112 animation: ocult 3s linear;
113}
114.align-items-end{
115 cursor:pointer;
116}
117.decoration{
118 text-decoration: none!important;
119}
120.icon-data-studio,
121.icon-data-studio:hover{
122 border: 1px solid #F6AE2D;
123 border-radius: 15px;
124 padding: 5px 10px;
125 font-size: 20px;
126 width: 30px;
127 display: flex;
128 text-align: center;
129 line-height: 0;
130 margin: 0 5px;
131 justify-content: center;
132 align-items: center;
133 color:#F6AE2D;
134 margin-left: 20px;
135 text-decoration:none;
136}
137.links{
138 display: flex;
139 align-items: center;
140 justify-content: center;
141}
142@keyframes ocult {
143 0% {
144 opacity: 1;
145 }
146
147 100% {
148 opacity: 0;
149 }
150}
151
152</style>
An error occurred while processing the template.
The following has evaluated to null or missing:
==> friendlyURLs[themeDisplay.getLanguageId()] [in template "20097#20123#489200" at line 29, column 14]
----
Tip: It's the final [] step that caused this error, not those before it.
----
Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----
----
FTL stack trace ("~" means nesting-related):
- Failed at: #assign url = friendlyURLs[themeDispl... [in template "20097#20123#489200" at line 29, column 1]
----
1<#assign journalArticleId = .vars['reserved-article-id'].data>
2<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") />
3<#assign journalArticleResourceLocalServiceUtil = serviceLocator.findService("com.liferay.journal.service.JournalArticleResourceLocalService")>
4<#assign assetCategoryLocalServiceUtil = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService")>
5<#assign assetVocabularyLocalServiceUtil = serviceLocator.findService("com.liferay.asset.kernel.service.AssetVocabularyLocalService")>
6
7<#assign articleResourcePK = journalArticleResourceLocalServiceUtil.getArticleResourcePrimKey(groupId, journalArticleId)/>
8<#assign categoryList=assetCategoryLocalServiceUtil.getCategories("com.liferay.journal.model.JournalArticle",articleResourcePK) >
9<#assign asset = assetEntryLocalService.getEntry('com.liferay.journal.model.JournalArticle', articleResourcePK) >
10<#if (Título?exists) && (Título.getData()?? && Título.getData() != "")>
11<#assign titulo = Título.getData()>
12</#if>
13<#if (themeDisplay.getLanguageId() == 'es_ES')>
14 <#assign indicador="Ver indicador"/>
15 <#assign copiado='Copiado'/>
16
17</#if>
18<#if (themeDisplay.getLanguageId() == 'ca_ES')>
19 <#assign indicador="Veure indicador"/>
20 <#assign copiado='Copiat'/>
21</#if>
22<#if (themeDisplay.getLanguageId() == 'en_US')>
23 <#assign indicador="View indicator"/>
24 <#assign copiado='Copy'/>
25</#if>
26
27<#list asset.getCategories() as category>
28<#assign catId = category.categoryId />
29<#assign url=friendlyURLs[themeDisplay.getLanguageId()]+'?filterCategoryIds='+catId />
30<div class="aqui" style="display:none">${url}</div>
31 <script>
32
33 function clickf(){
34 var dat= document.URL.split('/')
35 dat=dat[dat.length-1]
36 // location.href="${friendlyURLs[themeDisplay.getLanguageId()]!''}"
37 if( localStorage.getItem('urlMigas')!=undefined){
38 localStorage.removeItem('urlMigas');
39 localStorage.setItem('urlMigas', dat);
40
41 }else{
42 localStorage.setItem('urlMigas', dat);
43 }
44 console.log('${category.name}')
45 }
46 var urlDat="${friendlyURLs[themeDisplay.getLanguageId()]!""}"
47 urlDat=urlDat.split('/')
48 urlDat=urlDat[urlDat.length-1]
49 var idioma='${themeDisplay.getLanguageId()}'
50 idioma=idioma.split('_')[0]
51 var idCat = '${category.categoryId}'
52 var urldata=urlDat+"?filterCategoryIds="+'${catId}'
53 // console.log($('.interior[id-tab="'+idCat+'"]').html())
54 //$('.interior').find('.listado-tematica[id-tab="'+idCat+'"]').addClass("este")
55 $('.interior[id-tab="'+idCat+'"] ul').append("<li><button onclick='clickf()' class='btn-none align-items-end item-list-desp'> <a href='${friendlyURLs[themeDisplay.getLanguageId()]!''}?filterCategoryIds=${category.categoryId}' class='decoration'><div class='align-items-center d-flex flex-wrap'> <strong class='mr-2'>${titulo}:</strong> </div></a><div class='links'><!--<a href='${friendlyURLs[themeDisplay.getLanguageId()]!''}?filterCategoryIds=${category.categoryId}' class='link-arrow pl-2' > ${indicador}</a>--><button class='btn-none i link-arrow pl-2' onclick='window.open(`${friendlyURLs[themeDisplay.getLanguageId()]!''}?filterCategoryIds=${category.categoryId}`,`_blank`)'>${indicador}</button><button class='btn-none icon-data-studio'onclick='getlink(`http://5.175.40.126/api/Atm?graph="+urlDat+"?country="+idioma+"`)' class='icon-datastudio'><i title='${titulo}-dat' class='fa fa-flask' aria-hidden='true' aria-label='${titulo}-dat'></i><span class='visually-hidden'>${titulo}-dat</span></button></div></button></li>")
56 function getlink(element) {
57 var aux = document.createElement("input");
58 aux.setAttribute("value", element);
59 document.body.appendChild(aux);
60 aux.select();
61 document.execCommand("copy");
62 document.body.removeChild(aux);
63 $(event.target).parent().append('<p class="copy-style">${copiado}</p>')
64
65 // alert("URL copiada al portapapeles");
66 }
67
68
69 </script>
70</#list>
71<style>
72.btn-none{
73 background: none!important;
74 border: none!important;
75}
76.visually-hidden {
77 position: absolute;
78 width: 1px;
79 height: 1px;
80 margin: -1px;
81 padding: 0;
82 overflow: hidden;
83 clip: rect(0, 0, 0, 0);
84 border: 0;
85}
86.sr-only {
87 position: absolute;
88 width: 1px;
89 height: 1px;
90 margin: -1px;
91 padding: 0;
92 overflow: hidden;
93 clip: rect(0, 0, 0, 0);
94 border: 0;
95}
96.links {
97 position:relative;
98 min-width: 210px;
99}
100.copy-style{
101 background: #F6AE2D;
102 color:white;
103 padding:5px;
104 position: absolute;
105 right: 0;
106 top: -25px;
107 display: inline-block;
108 padding: 12px;
109 border-radius: 9px;
110 font-size: 14px;
111 opacity:0;
112 animation: ocult 3s linear;
113}
114.align-items-end{
115 cursor:pointer;
116}
117.decoration{
118 text-decoration: none!important;
119}
120.icon-data-studio,
121.icon-data-studio:hover{
122 border: 1px solid #F6AE2D;
123 border-radius: 15px;
124 padding: 5px 10px;
125 font-size: 20px;
126 width: 30px;
127 display: flex;
128 text-align: center;
129 line-height: 0;
130 margin: 0 5px;
131 justify-content: center;
132 align-items: center;
133 color:#F6AE2D;
134 margin-left: 20px;
135 text-decoration:none;
136}
137.links{
138 display: flex;
139 align-items: center;
140 justify-content: center;
141}
142@keyframes ocult {
143 0% {
144 opacity: 1;
145 }
146
147 100% {
148 opacity: 0;
149 }
150}
151
152</style>
An error occurred while processing the template.
The following has evaluated to null or missing:
==> friendlyURLs[themeDisplay.getLanguageId()] [in template "20097#20123#489200" at line 29, column 14]
----
Tip: It's the final [] step that caused this error, not those before it.
----
Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----
----
FTL stack trace ("~" means nesting-related):
- Failed at: #assign url = friendlyURLs[themeDispl... [in template "20097#20123#489200" at line 29, column 1]
----
1<#assign journalArticleId = .vars['reserved-article-id'].data>
2<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") />
3<#assign journalArticleResourceLocalServiceUtil = serviceLocator.findService("com.liferay.journal.service.JournalArticleResourceLocalService")>
4<#assign assetCategoryLocalServiceUtil = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService")>
5<#assign assetVocabularyLocalServiceUtil = serviceLocator.findService("com.liferay.asset.kernel.service.AssetVocabularyLocalService")>
6
7<#assign articleResourcePK = journalArticleResourceLocalServiceUtil.getArticleResourcePrimKey(groupId, journalArticleId)/>
8<#assign categoryList=assetCategoryLocalServiceUtil.getCategories("com.liferay.journal.model.JournalArticle",articleResourcePK) >
9<#assign asset = assetEntryLocalService.getEntry('com.liferay.journal.model.JournalArticle', articleResourcePK) >
10<#if (Título?exists) && (Título.getData()?? && Título.getData() != "")>
11<#assign titulo = Título.getData()>
12</#if>
13<#if (themeDisplay.getLanguageId() == 'es_ES')>
14 <#assign indicador="Ver indicador"/>
15 <#assign copiado='Copiado'/>
16
17</#if>
18<#if (themeDisplay.getLanguageId() == 'ca_ES')>
19 <#assign indicador="Veure indicador"/>
20 <#assign copiado='Copiat'/>
21</#if>
22<#if (themeDisplay.getLanguageId() == 'en_US')>
23 <#assign indicador="View indicator"/>
24 <#assign copiado='Copy'/>
25</#if>
26
27<#list asset.getCategories() as category>
28<#assign catId = category.categoryId />
29<#assign url=friendlyURLs[themeDisplay.getLanguageId()]+'?filterCategoryIds='+catId />
30<div class="aqui" style="display:none">${url}</div>
31 <script>
32
33 function clickf(){
34 var dat= document.URL.split('/')
35 dat=dat[dat.length-1]
36 // location.href="${friendlyURLs[themeDisplay.getLanguageId()]!''}"
37 if( localStorage.getItem('urlMigas')!=undefined){
38 localStorage.removeItem('urlMigas');
39 localStorage.setItem('urlMigas', dat);
40
41 }else{
42 localStorage.setItem('urlMigas', dat);
43 }
44 console.log('${category.name}')
45 }
46 var urlDat="${friendlyURLs[themeDisplay.getLanguageId()]!""}"
47 urlDat=urlDat.split('/')
48 urlDat=urlDat[urlDat.length-1]
49 var idioma='${themeDisplay.getLanguageId()}'
50 idioma=idioma.split('_')[0]
51 var idCat = '${category.categoryId}'
52 var urldata=urlDat+"?filterCategoryIds="+'${catId}'
53 // console.log($('.interior[id-tab="'+idCat+'"]').html())
54 //$('.interior').find('.listado-tematica[id-tab="'+idCat+'"]').addClass("este")
55 $('.interior[id-tab="'+idCat+'"] ul').append("<li><button onclick='clickf()' class='btn-none align-items-end item-list-desp'> <a href='${friendlyURLs[themeDisplay.getLanguageId()]!''}?filterCategoryIds=${category.categoryId}' class='decoration'><div class='align-items-center d-flex flex-wrap'> <strong class='mr-2'>${titulo}:</strong> </div></a><div class='links'><!--<a href='${friendlyURLs[themeDisplay.getLanguageId()]!''}?filterCategoryIds=${category.categoryId}' class='link-arrow pl-2' > ${indicador}</a>--><button class='btn-none i link-arrow pl-2' onclick='window.open(`${friendlyURLs[themeDisplay.getLanguageId()]!''}?filterCategoryIds=${category.categoryId}`,`_blank`)'>${indicador}</button><button class='btn-none icon-data-studio'onclick='getlink(`http://5.175.40.126/api/Atm?graph="+urlDat+"?country="+idioma+"`)' class='icon-datastudio'><i title='${titulo}-dat' class='fa fa-flask' aria-hidden='true' aria-label='${titulo}-dat'></i><span class='visually-hidden'>${titulo}-dat</span></button></div></button></li>")
56 function getlink(element) {
57 var aux = document.createElement("input");
58 aux.setAttribute("value", element);
59 document.body.appendChild(aux);
60 aux.select();
61 document.execCommand("copy");
62 document.body.removeChild(aux);
63 $(event.target).parent().append('<p class="copy-style">${copiado}</p>')
64
65 // alert("URL copiada al portapapeles");
66 }
67
68
69 </script>
70</#list>
71<style>
72.btn-none{
73 background: none!important;
74 border: none!important;
75}
76.visually-hidden {
77 position: absolute;
78 width: 1px;
79 height: 1px;
80 margin: -1px;
81 padding: 0;
82 overflow: hidden;
83 clip: rect(0, 0, 0, 0);
84 border: 0;
85}
86.sr-only {
87 position: absolute;
88 width: 1px;
89 height: 1px;
90 margin: -1px;
91 padding: 0;
92 overflow: hidden;
93 clip: rect(0, 0, 0, 0);
94 border: 0;
95}
96.links {
97 position:relative;
98 min-width: 210px;
99}
100.copy-style{
101 background: #F6AE2D;
102 color:white;
103 padding:5px;
104 position: absolute;
105 right: 0;
106 top: -25px;
107 display: inline-block;
108 padding: 12px;
109 border-radius: 9px;
110 font-size: 14px;
111 opacity:0;
112 animation: ocult 3s linear;
113}
114.align-items-end{
115 cursor:pointer;
116}
117.decoration{
118 text-decoration: none!important;
119}
120.icon-data-studio,
121.icon-data-studio:hover{
122 border: 1px solid #F6AE2D;
123 border-radius: 15px;
124 padding: 5px 10px;
125 font-size: 20px;
126 width: 30px;
127 display: flex;
128 text-align: center;
129 line-height: 0;
130 margin: 0 5px;
131 justify-content: center;
132 align-items: center;
133 color:#F6AE2D;
134 margin-left: 20px;
135 text-decoration:none;
136}
137.links{
138 display: flex;
139 align-items: center;
140 justify-content: center;
141}
142@keyframes ocult {
143 0% {
144 opacity: 1;
145 }
146
147 100% {
148 opacity: 0;
149 }
150}
151
152</style>
An error occurred while processing the template.
The following has evaluated to null or missing:
==> friendlyURLs[themeDisplay.getLanguageId()] [in template "20097#20123#489200" at line 29, column 14]
----
Tip: It's the final [] step that caused this error, not those before it.
----
Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----
----
FTL stack trace ("~" means nesting-related):
- Failed at: #assign url = friendlyURLs[themeDispl... [in template "20097#20123#489200" at line 29, column 1]
----
1<#assign journalArticleId = .vars['reserved-article-id'].data>
2<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") />
3<#assign journalArticleResourceLocalServiceUtil = serviceLocator.findService("com.liferay.journal.service.JournalArticleResourceLocalService")>
4<#assign assetCategoryLocalServiceUtil = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService")>
5<#assign assetVocabularyLocalServiceUtil = serviceLocator.findService("com.liferay.asset.kernel.service.AssetVocabularyLocalService")>
6
7<#assign articleResourcePK = journalArticleResourceLocalServiceUtil.getArticleResourcePrimKey(groupId, journalArticleId)/>
8<#assign categoryList=assetCategoryLocalServiceUtil.getCategories("com.liferay.journal.model.JournalArticle",articleResourcePK) >
9<#assign asset = assetEntryLocalService.getEntry('com.liferay.journal.model.JournalArticle', articleResourcePK) >
10<#if (Título?exists) && (Título.getData()?? && Título.getData() != "")>
11<#assign titulo = Título.getData()>
12</#if>
13<#if (themeDisplay.getLanguageId() == 'es_ES')>
14 <#assign indicador="Ver indicador"/>
15 <#assign copiado='Copiado'/>
16
17</#if>
18<#if (themeDisplay.getLanguageId() == 'ca_ES')>
19 <#assign indicador="Veure indicador"/>
20 <#assign copiado='Copiat'/>
21</#if>
22<#if (themeDisplay.getLanguageId() == 'en_US')>
23 <#assign indicador="View indicator"/>
24 <#assign copiado='Copy'/>
25</#if>
26
27<#list asset.getCategories() as category>
28<#assign catId = category.categoryId />
29<#assign url=friendlyURLs[themeDisplay.getLanguageId()]+'?filterCategoryIds='+catId />
30<div class="aqui" style="display:none">${url}</div>
31 <script>
32
33 function clickf(){
34 var dat= document.URL.split('/')
35 dat=dat[dat.length-1]
36 // location.href="${friendlyURLs[themeDisplay.getLanguageId()]!''}"
37 if( localStorage.getItem('urlMigas')!=undefined){
38 localStorage.removeItem('urlMigas');
39 localStorage.setItem('urlMigas', dat);
40
41 }else{
42 localStorage.setItem('urlMigas', dat);
43 }
44 console.log('${category.name}')
45 }
46 var urlDat="${friendlyURLs[themeDisplay.getLanguageId()]!""}"
47 urlDat=urlDat.split('/')
48 urlDat=urlDat[urlDat.length-1]
49 var idioma='${themeDisplay.getLanguageId()}'
50 idioma=idioma.split('_')[0]
51 var idCat = '${category.categoryId}'
52 var urldata=urlDat+"?filterCategoryIds="+'${catId}'
53 // console.log($('.interior[id-tab="'+idCat+'"]').html())
54 //$('.interior').find('.listado-tematica[id-tab="'+idCat+'"]').addClass("este")
55 $('.interior[id-tab="'+idCat+'"] ul').append("<li><button onclick='clickf()' class='btn-none align-items-end item-list-desp'> <a href='${friendlyURLs[themeDisplay.getLanguageId()]!''}?filterCategoryIds=${category.categoryId}' class='decoration'><div class='align-items-center d-flex flex-wrap'> <strong class='mr-2'>${titulo}:</strong> </div></a><div class='links'><!--<a href='${friendlyURLs[themeDisplay.getLanguageId()]!''}?filterCategoryIds=${category.categoryId}' class='link-arrow pl-2' > ${indicador}</a>--><button class='btn-none i link-arrow pl-2' onclick='window.open(`${friendlyURLs[themeDisplay.getLanguageId()]!''}?filterCategoryIds=${category.categoryId}`,`_blank`)'>${indicador}</button><button class='btn-none icon-data-studio'onclick='getlink(`http://5.175.40.126/api/Atm?graph="+urlDat+"?country="+idioma+"`)' class='icon-datastudio'><i title='${titulo}-dat' class='fa fa-flask' aria-hidden='true' aria-label='${titulo}-dat'></i><span class='visually-hidden'>${titulo}-dat</span></button></div></button></li>")
56 function getlink(element) {
57 var aux = document.createElement("input");
58 aux.setAttribute("value", element);
59 document.body.appendChild(aux);
60 aux.select();
61 document.execCommand("copy");
62 document.body.removeChild(aux);
63 $(event.target).parent().append('<p class="copy-style">${copiado}</p>')
64
65 // alert("URL copiada al portapapeles");
66 }
67
68
69 </script>
70</#list>
71<style>
72.btn-none{
73 background: none!important;
74 border: none!important;
75}
76.visually-hidden {
77 position: absolute;
78 width: 1px;
79 height: 1px;
80 margin: -1px;
81 padding: 0;
82 overflow: hidden;
83 clip: rect(0, 0, 0, 0);
84 border: 0;
85}
86.sr-only {
87 position: absolute;
88 width: 1px;
89 height: 1px;
90 margin: -1px;
91 padding: 0;
92 overflow: hidden;
93 clip: rect(0, 0, 0, 0);
94 border: 0;
95}
96.links {
97 position:relative;
98 min-width: 210px;
99}
100.copy-style{
101 background: #F6AE2D;
102 color:white;
103 padding:5px;
104 position: absolute;
105 right: 0;
106 top: -25px;
107 display: inline-block;
108 padding: 12px;
109 border-radius: 9px;
110 font-size: 14px;
111 opacity:0;
112 animation: ocult 3s linear;
113}
114.align-items-end{
115 cursor:pointer;
116}
117.decoration{
118 text-decoration: none!important;
119}
120.icon-data-studio,
121.icon-data-studio:hover{
122 border: 1px solid #F6AE2D;
123 border-radius: 15px;
124 padding: 5px 10px;
125 font-size: 20px;
126 width: 30px;
127 display: flex;
128 text-align: center;
129 line-height: 0;
130 margin: 0 5px;
131 justify-content: center;
132 align-items: center;
133 color:#F6AE2D;
134 margin-left: 20px;
135 text-decoration:none;
136}
137.links{
138 display: flex;
139 align-items: center;
140 justify-content: center;
141}
142@keyframes ocult {
143 0% {
144 opacity: 1;
145 }
146
147 100% {
148 opacity: 0;
149 }
150}
151
152</style>
An error occurred while processing the template.
The following has evaluated to null or missing:
==> friendlyURLs[themeDisplay.getLanguageId()] [in template "20097#20123#489200" at line 29, column 14]
----
Tip: It's the final [] step that caused this error, not those before it.
----
Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----
----
FTL stack trace ("~" means nesting-related):
- Failed at: #assign url = friendlyURLs[themeDispl... [in template "20097#20123#489200" at line 29, column 1]
----
1<#assign journalArticleId = .vars['reserved-article-id'].data>
2<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") />
3<#assign journalArticleResourceLocalServiceUtil = serviceLocator.findService("com.liferay.journal.service.JournalArticleResourceLocalService")>
4<#assign assetCategoryLocalServiceUtil = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService")>
5<#assign assetVocabularyLocalServiceUtil = serviceLocator.findService("com.liferay.asset.kernel.service.AssetVocabularyLocalService")>
6
7<#assign articleResourcePK = journalArticleResourceLocalServiceUtil.getArticleResourcePrimKey(groupId, journalArticleId)/>
8<#assign categoryList=assetCategoryLocalServiceUtil.getCategories("com.liferay.journal.model.JournalArticle",articleResourcePK) >
9<#assign asset = assetEntryLocalService.getEntry('com.liferay.journal.model.JournalArticle', articleResourcePK) >
10<#if (Título?exists) && (Título.getData()?? && Título.getData() != "")>
11<#assign titulo = Título.getData()>
12</#if>
13<#if (themeDisplay.getLanguageId() == 'es_ES')>
14 <#assign indicador="Ver indicador"/>
15 <#assign copiado='Copiado'/>
16
17</#if>
18<#if (themeDisplay.getLanguageId() == 'ca_ES')>
19 <#assign indicador="Veure indicador"/>
20 <#assign copiado='Copiat'/>
21</#if>
22<#if (themeDisplay.getLanguageId() == 'en_US')>
23 <#assign indicador="View indicator"/>
24 <#assign copiado='Copy'/>
25</#if>
26
27<#list asset.getCategories() as category>
28<#assign catId = category.categoryId />
29<#assign url=friendlyURLs[themeDisplay.getLanguageId()]+'?filterCategoryIds='+catId />
30<div class="aqui" style="display:none">${url}</div>
31 <script>
32
33 function clickf(){
34 var dat= document.URL.split('/')
35 dat=dat[dat.length-1]
36 // location.href="${friendlyURLs[themeDisplay.getLanguageId()]!''}"
37 if( localStorage.getItem('urlMigas')!=undefined){
38 localStorage.removeItem('urlMigas');
39 localStorage.setItem('urlMigas', dat);
40
41 }else{
42 localStorage.setItem('urlMigas', dat);
43 }
44 console.log('${category.name}')
45 }
46 var urlDat="${friendlyURLs[themeDisplay.getLanguageId()]!""}"
47 urlDat=urlDat.split('/')
48 urlDat=urlDat[urlDat.length-1]
49 var idioma='${themeDisplay.getLanguageId()}'
50 idioma=idioma.split('_')[0]
51 var idCat = '${category.categoryId}'
52 var urldata=urlDat+"?filterCategoryIds="+'${catId}'
53 // console.log($('.interior[id-tab="'+idCat+'"]').html())
54 //$('.interior').find('.listado-tematica[id-tab="'+idCat+'"]').addClass("este")
55 $('.interior[id-tab="'+idCat+'"] ul').append("<li><button onclick='clickf()' class='btn-none align-items-end item-list-desp'> <a href='${friendlyURLs[themeDisplay.getLanguageId()]!''}?filterCategoryIds=${category.categoryId}' class='decoration'><div class='align-items-center d-flex flex-wrap'> <strong class='mr-2'>${titulo}:</strong> </div></a><div class='links'><!--<a href='${friendlyURLs[themeDisplay.getLanguageId()]!''}?filterCategoryIds=${category.categoryId}' class='link-arrow pl-2' > ${indicador}</a>--><button class='btn-none i link-arrow pl-2' onclick='window.open(`${friendlyURLs[themeDisplay.getLanguageId()]!''}?filterCategoryIds=${category.categoryId}`,`_blank`)'>${indicador}</button><button class='btn-none icon-data-studio'onclick='getlink(`http://5.175.40.126/api/Atm?graph="+urlDat+"?country="+idioma+"`)' class='icon-datastudio'><i title='${titulo}-dat' class='fa fa-flask' aria-hidden='true' aria-label='${titulo}-dat'></i><span class='visually-hidden'>${titulo}-dat</span></button></div></button></li>")
56 function getlink(element) {
57 var aux = document.createElement("input");
58 aux.setAttribute("value", element);
59 document.body.appendChild(aux);
60 aux.select();
61 document.execCommand("copy");
62 document.body.removeChild(aux);
63 $(event.target).parent().append('<p class="copy-style">${copiado}</p>')
64
65 // alert("URL copiada al portapapeles");
66 }
67
68
69 </script>
70</#list>
71<style>
72.btn-none{
73 background: none!important;
74 border: none!important;
75}
76.visually-hidden {
77 position: absolute;
78 width: 1px;
79 height: 1px;
80 margin: -1px;
81 padding: 0;
82 overflow: hidden;
83 clip: rect(0, 0, 0, 0);
84 border: 0;
85}
86.sr-only {
87 position: absolute;
88 width: 1px;
89 height: 1px;
90 margin: -1px;
91 padding: 0;
92 overflow: hidden;
93 clip: rect(0, 0, 0, 0);
94 border: 0;
95}
96.links {
97 position:relative;
98 min-width: 210px;
99}
100.copy-style{
101 background: #F6AE2D;
102 color:white;
103 padding:5px;
104 position: absolute;
105 right: 0;
106 top: -25px;
107 display: inline-block;
108 padding: 12px;
109 border-radius: 9px;
110 font-size: 14px;
111 opacity:0;
112 animation: ocult 3s linear;
113}
114.align-items-end{
115 cursor:pointer;
116}
117.decoration{
118 text-decoration: none!important;
119}
120.icon-data-studio,
121.icon-data-studio:hover{
122 border: 1px solid #F6AE2D;
123 border-radius: 15px;
124 padding: 5px 10px;
125 font-size: 20px;
126 width: 30px;
127 display: flex;
128 text-align: center;
129 line-height: 0;
130 margin: 0 5px;
131 justify-content: center;
132 align-items: center;
133 color:#F6AE2D;
134 margin-left: 20px;
135 text-decoration:none;
136}
137.links{
138 display: flex;
139 align-items: center;
140 justify-content: center;
141}
142@keyframes ocult {
143 0% {
144 opacity: 1;
145 }
146
147 100% {
148 opacity: 0;
149 }
150}
151
152</style>