Noticias - Aquona
Noticias
Se ha producido un error al procesar la plantilla.
The following has evaluated to null or missing: ==> dmImage.getValue().getString(locale) [in template "20116#20152#32606" at line 100, column 34] ---- 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 value = dmImage.getValue().ge... [in template "20116#20152#32606" at line 100, column 17] ----
1<#--
2Application display templates can be used to modify the look of a
3specific application.
4
5Please use the left panel to quickly add commonly used variables.
6Autocomplete is also available and can be invoked by typing "${".
7-->
8<style>
9.generic-content .agbar-list.list-news .principal figure> img {
10 margin-right: 35px;
11 float: left;
12 max-width: 50%;
13 width: 50%;
14 height: 400px;
15}
16
17@media (min-width: 992px) {
18 .principal > a > img {
19 height: auto !important;
20 margin-right: 35px !important;
21 float: left !important;
22 max-width: 50% !important;
23 width: 50% !important;
24 height: 400px !important;
25 }
26}
27
28
29
30.listado-destacados {
31 h3, h4, h5, h6 {
32 font-size: $size12pt;
33 margin-top: 10px;
34 font-family: 'OpenSans-Regular';
35 margin-top: 25px;
36 text-align: left;
37 }
38 .summary {
39 font-size: $size11pt;
40 line-height: 1.5;
41 margin-bottom: auto;
42 text-align: left;
43 }
44}
45
46</style>
47
48<#assign htmlUtil = staticUtil["com.liferay.portal.kernel.util.HtmlUtil"] />
49
50<#function printImage image alt>
51 <#if image?? && image != "">
52 <#if alt?? && alt != "">
53 <#return '<img src="${htmlUtil.escape(image)}" alt="${alt}" />'/>
54 <#else>
55 <#return '<img src="${htmlUtil.escape(image)}" alt=""/>'/>
56 </#if>
57 </#if>
58 <#return "">
59</#function>
60<#if entries?has_content>
61<div class="generic-content">
62 <div class="agbar-list list-news">
63 <#assign isFirstTime = true>
64
65 <#assign curEntry = entries[0]>
66 <#assign image = "">
67 <#assign imageAlt = "">
68 <#assign listImage = "">
69 <#assign listImageAlt = "">
70 <#assign detailImage = "">
71 <#assign detailImageAlt = "">
72 <#assign cssClass = "'h2','h4'" />
73 <#assign
74 assetRenderer = curEntry.getAssetRenderer()
75
76 ddmFormValuesReader = assetRenderer.getDDMFormValuesReader()
77
78 textFields = ddmFormValuesReader.getDDMFormFieldValues('text')
79 dmImages = ddmFormValuesReader.getDDMFormFieldValues('image')
80
81 dateFields = ddmFormValuesReader.getDDMFormFieldValues('date')
82
83 />
84 <#assign titulo = assetRenderer.getTitle(locale)
85 listImage=""
86 listImageAlt=""
87 detailImage=""
88 detailImageAlt=""/>
89 <#list textFields as textField>
90 <#if textField.name == 'DescripcionListado'>
91 <#assign descripcion = textField.getValue().getString(locale) />
92 </#if>
93 </#list>
94 <#list dateFields as dateField>
95 <#if dateField.name == 'Fecha'>
96 <#assign fecha = dateField.getValue().getString(locale) />
97 </#if>
98 </#list>
99 <#list dmImages as dmImage>
100 <#assign value = dmImage.getValue().getString(locale)/>
101 <#assign icono_map = jsonFactoryUtil.createJSONObject(value) />
102 <#attempt>
103 <#if dmImage.name == 'ImagenListado'>
104 <#if (icono_map.groupId)?? && (icono_map.uuid)?? >
105 <#assign listImage = "/documents/" + icono_map.groupId + "/" + icono_map.uuid />
106 </#if>
107 <#if (icono_map.alt)??>
108 <#assign listImageAlt = icono_map.alt/>
109 </#if>
110 <#elseif dmImage.name == 'ImagenDetalle' && dmImage??>
111 <#if (icono_map.groupId)?? && (icono_map.uuid)?? >
112 <#assign detailImage = "/documents/" + icono_map.groupId + "/" + icono_map.uuid />
113 </#if>
114 <#if (icono_map.alt)??>
115 <#assign detailImageAlt = icono_map.alt/>
116 </#if>
117 </#if>
118 <#recover>
119 </#attempt>
120 </#list>
121
122 <#if listImage?? && listImage != "">
123 <#assign image = listImage>
124 <#if listImageAlt?? && listImageAlt != "">
125 <#assign imageAlt = listImageAlt>
126 </#if>
127 <#elseif detailImage?? && detailImage != "">
128 <#assign image = detailImage>
129 <#if detailImageAlt?? && detailImageAlt != "">
130 <#assign imageAlt = detailImageAlt>
131 </#if>
132 </#if>
133
134 <#assign viewURL1 = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, curEntry) />
135 <#assign viewURL2 = assetRenderer.getURLViewInContext(renderRequest, renderResponse, viewURL1) />
136 <header>
137 <div class="container">
138 <article class="principal">
139 <a href="${viewURL2}" data-senna-off="true">
140 ${printImage(image, imageAlt)}
141 </a>
142 <#attempt>
143 <#assign structureDate = fecha>
144 <#assign displayDate = dateUtil.parseDate("yyyy-MM-dd", structureDate, locale)>
145 <#recover>
146 <#assign displayDate = curEntry.getCreateDate()?date>
147 </#attempt>
148
149 <time datetime="${dateUtil.getDate(displayDate, "dd/MM/yyyy", locale)}"><span>${dateUtil.getDate(displayDate, "dd MMM yyyy", locale)}</span></time>
150 <h2><a href="${viewURL2}" data-senna-off="true">${titulo}</a></h2>
151 <p class="entradilla">${descripcion}</p>
152 </article>
153 </div>
154 </header>
155
156 </div>
157 </div>
158</#if>