CASOS DE ÉXITO

Trabajamos cada proyecto buscando la mejor solución

DDM Structure Key
Faceta personalizada
Se ha producido un error al procesar la plantilla.
The following has evaluated to null or missing:
==> deltaValue  [in template "20097#20123#46388" at line 135, column 96]

----
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: ${deltaValue + newDeltaValue}  [in template "20097#20123#46388" at line 135, column 94]
----
1<#setting locale="es_ES" /> 
2<#include "${fullTemplatesPath}/common/journal_article_util.ftl" /> 
3<#include "${fullTemplatesPath}/common/asset_entry_util.ftl" /> 
4<#attempt> 
5    <#assign structureKey = request.getParameter("ddmstructurekey") /> 
6    <#recover> 
7        <#assign structureKey = '' /> 
8</#attempt> 
9<div class="cyc-casos-exito"> 
10    <#if entries?has_content && structureKey?has_content> 
11        <@initAssetEntryJournalArticlePortletVariables/> 
12        <#attempt> 
13            <#assign deltaValue = request.getParameter("delta")?number/> 
14            <#recover> 
15                <#assign deltaValue = 6 /> 
16        </#attempt> 
17        <#assign newDeltaValue = deltaValue+6 /> 
18        <#if (entries?size % 3 == 0)> 
19            <#assign x = 1> 
20        <#elseif (entries?size % 3 == 2)> 
21            <#assign x = 1> 
22        <#else> 
23            <#assign x = 0> 
24        </#if> 
25        <div class="row space-column container-fluid"> 
26            <div class="col-12 col-md-6 column-left"></div> 
27            <div class="col-12 col-md-6 column-right"></div> 
28        </div> 
29        <#assign itemsPrinted = 0 /> 
30    <#-- <#assign countArticles = journalArticleLocalService.getArticlesByStructureId(groupId, structureKey, 0, 0, 99, null)/>--> 
31       <#list entries as entry> 
32            <@initAssetEntryJournalArticleItemVariables entry/> 
33            <#assign title = getFieldFromJournalArticleCasosDeExito(currentEntryJournalArticle,docArticle,"section0_title", "section0")/> 
34            <#assign imagen = getImagenFromJournalArticleCasosDeExito(currentEntryJournalArticle,docArticle,"section0_image", "section0")/> 
35            <#if entry?index &lt; deltaValue?number> 
36            <#-- Coger categoria a mostrar --> 
37                <#list vocabularies as vocabulary> 
38                <#-- En dev el vocabulario se llama tipo de solucion / En pro se llama tipo-de-solución. Cambiar dependiendo del entorno --> 
39                    <#if vocabulary.getName()?lower_case == "tipo-de-solución"> 
40                        <#assign tipoSolucionId = vocabulary.getVocabularyId() /> 
41                    </#if> 
42                </#list> 
43                <#list currentEntryCategoryList as category> 
44                    <#if category.getVocabularyId() == tipoSolucionId> 
45                        <#assign categoryToShow = category.getName()/> 
46                    </#if> 
47                </#list> 
48                <#assign itemsPrinted = itemsPrinted+1 /> 
49            <#--Comprobar si poner 2 imagenes o solo una imagen full-width--> 
50                <#if x == 1 || x == 2> 
51                <#--Comprobar si es el primer item de las dos columnas (row)--> 
52                    <#if x == 1> 
53                        <div class="row two-images"> 
54                        <div class="col-12 col-md-6 column-left"> 
55                    <#else> 
56                        <div class="col-12 col-md-6 column-right"> 
57                    </#if> 
58                </#if> 
59                <a href="${entry.getViewURL()}"> 
60                    <div class="image-container"> 
61                        <img class="image test-abba" src="${imagen.url}"  alt="${imagen.alt}"/> 
62                    </div> 
63                    <#if x == 0> 
64                    <div class="row full-image-mobile full-image-desktop .plr-24"> 
65                        <div class="col-12 col-md-6 column-left"> 
66                            <#else> 
67                            <div class="row full-image-mobile"> 
68                                </#if> 
69                                <div class="content-casos-de-exito"> 
70                                    <h2 class="antetitle">${categoryToShow}</h2> 
71                                    <h1 class="title">${title}</h1> 
72                                    <i class="cyc-icon-arrow" /> 
73                                </div> 
74                            </div> 
75                            <#if x == 0> 
76                            <div class="col-12 col-md-6 column-right"></div> 
77                        </div> 
78                        </#if> 
79                </a> 
80                <#if x == 2> 
81                <#--Cierre de rows--> 
82                    </div> 
83                    </div> 
84                    <#assign x = -1> 
85                <#elseif x == 0> 
86                    <#assign x = 0> 
87                <#else> 
88                <#--Cierre de primera columna de las dos fotos--> 
89                    </div> 
90                </#if> 
91            </#if> 
92            <#assign x++/> 
93        </#list> 
94        <#if (itemsPrinted?number)== (deltaValue?number) > 
95            <div class="row container-fluid row-btn"> 
96                <div class="d-none d-md-block col-md-4 column-left-btn"></div> 
97                <div class="col-12 col-md-4 column-btn"> 
98                    <a class="load-more mx-auto" 
99                            id="btn-load-more" 
100                            href="" 
101
102                        Cargar más 
103                    </a> 
104                </div> 
105                <div class="d-none d-md-block col-md-4 column-right-btn"></div> 
106            </div> 
107            <div class="row space-column container-fluid"> 
108                <div class="col-12 col-md-6 column-left-btn column-btn" ></div> 
109                <div class="col-12 col-md-6 column-right-btn column-btn" ></div> 
110            </div> 
111        </#if> 
112    </#if> 
113 
114</div> 
115<script> 
116 
117    AUI().ready(function () { 
118 
119 
120        var values = window.location.search; 
121        var urlParams = new URLSearchParams(values); 
122        var left = urlParams.get("left"); 
123        var top = urlParams.get("top"); 
124        const btnLoadMore = document.getElementById('btn-load-more'); 
125        const posicion = btnLoadMore.getBoundingClientRect(); 
126        const desplazamientoX = window.pageXOffset || document.documentElement.scrollLeft; 
127        const desplazamientoY = window.pageYOffset || document.documentElement.scrollTop; 
128        const posicionX = posicion.left + desplazamientoX; 
129        const posicionY = posicion.top + desplazamientoY; 
130        var url = new URL(window.location.href); 
131        url.search = ''; 
132        window.scrollTo(left,top); 
133        btnLoadMore.addEventListener('click', function(event) { 
134            event.preventDefault(); 
135            url = url + "?ddmstructurekey=" + urlParams.get("ddmstructurekey") + "&delta=" + ${deltaValue + newDeltaValue} + "&left=" + posicionX + "&top=" + posicionY; 
136            window.location.href = url; 
137        }); 
138 
139    }); 
140 
141 
142</script> 

¿Hablamos? Subscríbete a nuestra newsletter y recibe periódicamente todas nuestras novedades. Tenemos mucho que contarte.