Histórico Noticias
Se ha producido un error al procesar la plantilla.
The following has evaluated to null or missing:
==> TipoTexto [in template "10202#10240#199396527" at line 24, column 15]
----
Tip: If the failing expression is known to be 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: ${TipoTexto.getData()} [in template "10202#10240#199396527" at line 24, column 13]
---- 1<#assign page_group=layout.getGroup() /> 2<#assign site_default_public_url=htmlUtil.escape(page_group.getDisplayURL(themeDisplay, false)) /> 3<#assign JournalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") /> 4<#assign DDMStructureLocalService = serviceLocator.findService("com.liferay.dynamic.data.mapping.service.DDMStructureLocalService") /> 5<#assign OrderByComparatorFactoryUtil = staticUtil["com.liferay.portal.kernel.util.OrderByComparatorFactoryUtil"] /> 6<#assign articlesOrderBy = OrderByComparatorFactoryUtil.create("JournalArticle", ["createDate", false]) /> 7<#assign article = JournalArticleLocalService.getArticle(groupId, .vars['reserved-article-id'].data) /> 8<#assign DDMstructure = article.getDDMStructure() /> 9<#assign latestArticles = JournalArticleLocalService.getArticlesByStructureId(groupId, DDMstructure.getStructureKey(), 0, 0, 4, articlesOrderBy) /> 10<#assign imageURL=article.getArticleImageURL(themeDisplay) /> 11 12<#setting url_escaping_charset='UTF-8'> 13 14<#assign articleURL = site_default_public_url + "/-/" + article.getUrlTitle() /> 15<#assign encodedArticleURL = articleURL?url> 16<#assign encodedTitle = article.getTitle()?url> 17 18 19 20<div class="DEAJ-noticia-container"> 21 <div class="DEAJ-noticia-wrapper"> 22 <div class="DEAJ-noticia-header"> 23 <div class="label-tipo-noticia" style="font-weight: bold; color: #19325B; margin-bottom: 10px; text-transform: uppercase;"> 24 ${TipoTexto.getData()} 25 </div> 26 <span><i class="fas fa-calendar"></i>${dateUtil.getDate(article.getDisplayDate(), "d MMMM yyyy", locale)}</span> 27 <h1 class="ep-noticia-title">${article.getTitle()}</h1> 28 </div> 29 <div class="DEAJ-noticia-content"> 30 <#-- Asignamos el contenido a una variable --> 31 <#assign contentText = Content.getData()> 32 33 <#-- Verificamos si existe el marcador en el texto --> 34 <#if contentText?contains("[IMAGEN]")> 35 <#assign parts = contentText?split("[IMAGEN]")> 36 37 <#-- Imprimimos la primera parte --> 38 ${parts[0]} 39 40 <#-- Imprimimos la imagen con estilos --> 41 <div class="DEAJ-inserted-image" style="margin: 20px 0; text-align: center;"> 42 <img src="${imageURL}" alt="Imagen de noticia" style="max-width: 100%; height: auto; border-radius: 10px;"> 43 </div> 44 45 <#-- Imprimimos el resto del texto --> 46 ${parts[1]} 47 <#else> 48 <#-- Si no se puso el marcador, mostramos el contenido normal --> 49 ${contentText} 50 </#if> 51</div> 52 <div class="DEAJ-share-list"> 53 <a href="https://twitter.com/intent/tweet?url=${encodedArticleURL}&text=${encodedTitle}" target="_blank" rel="noopener"> 54 <img src="/documents/2392986/199210551/Grupo+29091.png/38ac720c-2c24-5f02-22e1-fde0ec59826c?t=1759119906347" alt="Compartir en X / Twitter"> 55 </a> 56 57 <a href="https://www.facebook.com/sharer/sharer.php?u=${encodedArticleURL}" target="_blank" rel="noopener"> 58 <img src="/documents/2392986/199210551/Grupo+29093.png/8faa4a5d-fc9a-7d64-357e-87e84f412f83?t=1759119906607" alt="Compartir en Facebook"> 59 </a> 60 61 <a href="mailto:?subject=${encodedTitle}&body=${encodedArticleURL}" target="_blank" rel="noopener"> 62 <img src="/documents/2392986/199210551/Grupo+29095.png/d099a112-493c-e456-1180-c9b68678c952?t=1759119906767" alt="Compartir via Correo"> 63 </a> 64 65 <a href="javascript:void(0);" onclick="copyToClipboard(this, '${articleURL}')" title="Copiar enlace" class="DEAJ-copy-link"> 66 <img src="/documents/2392986/199210551/Grupo+29097.png/522a40de-8c39-c227-b87e-43117ace770f?t=1759119906943" alt="Copiar en el portapapeles"> 67 <span class="DEAJ-tooltip-text">¡Copiado!</span> 68 </a> 69 </div> 70 </div> 71 <div class="row align-items-stretch"> 72 <div class="col-md-12"> 73 <h1>Últimas noticias</h1> 74 </div> 75 <#assign count = 0 /> 76 <#list latestArticles as latestArticle> 77 <#if (latestArticle.getArticleId() != article.getArticleId() && count < 3)> 78 <#assign count = count + 1 /> 79 <div class="col-lg-6 col-xl-4"> 80 <div class="DEAJ-card-noticia"> 81 <a href="${site_default_public_url}/-/${latestArticle.getUrlTitle()}"> 82 <img src="${latestArticle.getArticleImageURL(themeDisplay)}" alt="${latestArticle.getTitle()}"> 83 </a> 84 <div class="DEAJ-card-noticia-info"> 85 <a href="${site_default_public_url}/-/${latestArticle.getUrlTitle()}"> 86 <h2>${latestArticle.getTitle()}</h2> 87 </a> 88 <div class="DEAJ-card-noticia-info-summary"> 89 ${latestArticle.getDescription()} 90 </div> 91 <span class="DEAJ-card-noticia-info-date"> 92 <i class="fas fa-calendar"></i> 93 ${dateUtil.getDate(latestArticle.getDisplayDate(), "d MMMM yyyy", locale)} 94 </span> 95 </div> 96 </div> 97 </div> 98 </#if> 99 </#list> 100 </div> 101</div> 102 103<script> 104function copyToClipboard(element, text) { 105 if (navigator.clipboard) { 106 navigator.clipboard.writeText(text).then(function() { 107 showTooltip(element); 108 }); 109 } else { 110 var tempInput = document.createElement("input"); 111 tempInput.value = text; 112 document.body.appendChild(tempInput); 113 tempInput.select(); 114 document.execCommand("copy"); 115 document.body.removeChild(tempInput); 116 showTooltip(element); 117 } 118} 119 120function showTooltip(element) { 121 element.classList.add("show-tooltip"); 122 setTimeout(function() { 123 element.classList.remove("show-tooltip"); 124 }, 2000); // Tooltip visible por 2 segundos 125} 126</script> 127 128<style> 129 .DEAJ-noticia-container { 130 padding: 80px var(--deaj-padding-inline, 10.5%); 131 background-color: white; 132 } 133 134 .DEAJ-noticia-wrapper { 135 max-width: 1021px; 136 margin-inline: auto; 137 } 138 139 .DEAJ-noticia-header span, 140 .DEAJ-noticia-header span i { 141 color: var(--deaj-light-gray, #7F8DA3); 142 font-size: 1.125rem; 143 line-height: 27px; 144 font-weight: 400; 145 } 146 147 .DEAJ-noticia-header span i { 148 margin-right: 10px; 149 } 150 151 .DEAJ-noticia-header h1 { 152 font-size: 1.875rem; 153 color: var(--deaj-dark-blue, #19325B); 154 line-height: 36px; 155 margin-top: 48px; 156 margin-bottom: 32px; 157 font-weight: bold; 158 } 159 160 .DEAJ-noticia-content { 161 padding-bottom: 22px; 162 } 163 164 .DEAJ-noticia-content p, 165 .DEAJ-noticia-content * p { 166 font-size: 19pt; 167 color: var(--deaj-text-color, #274A8A); 168 line-height: 25px; 169 margin-bottom: 20px; 170 font-weight: 400; 171 } 172 173 .DEAJ-noticia-content * { 174 color: var(--deaj-text-color, #274A8A); 175 font-size: 19pt; 176 } 177 178 .DEAJ-share-list { 179 margin-top: 10px; 180 margin-bottom: 50px; 181 display: flex; 182 flex-flow: row wrap; 183 gap: 16px; 184 justify-content: flex-start; 185 } 186 187 .DEAJ-share-list a { 188 text-decoration: none !important; 189 } 190 191 .DEAJ-share-list a img { 192 width: 44px; 193 height: 44px; 194 object-fit: contain; 195 } 196 197 .DEAJ-copy-link { 198 position: relative; 199 display: inline-block; 200 } 201 202 .DEAJ-tooltip-text { 203 visibility: hidden; 204 background-color: #19325B; 205 color: #fff; 206 text-align: center; 207 border-radius: 5px; 208 padding: 5px 8px; 209 position: absolute; 210 z-index: 1; 211 top: -35px; 212 left: 50%; 213 transform: translateX(-50%); 214 font-size: 0.875rem; 215 white-space: nowrap; 216 opacity: 0; 217 transition: opacity 0.3s ease; 218 } 219 220 .DEAJ-copy-link.show-tooltip .DEAJ-tooltip-text { 221 visibility: visible; 222 opacity: 1; 223 } 224 225 .DEAJ-noticia-container .row { 226 gap: 30px 0px; 227 border-top: 1px solid var(--deaj-green-color, #A0DEAC); 228 } 229 230 .DEAJ-noticia-container .row h1 { 231 font-size: 1.5rem; 232 color: var(--deaj-dark-blue, #19325B); 233 line-height: 27px; 234 margin-bottom: 30px; 235 margin-top: 40px; 236 font-weight: 400 !important; 237 padding-left: 15px; 238 } 239 240 .DEAJ-card-noticia { 241 background-color: white; 242 border-radius: 30px; 243 height: 100%; 244 display: flex; 245 flex-flow: column; 246 box-shadow: 0px 0px 10px 3px rgba(0, 0, 0, 0.1); 247 } 248 249 .DEAJ-card-noticia img { 250 max-width: 100%; 251 width: 100%; 252 object-fit: cover; 253 border-radius: 30px; 254 height: 242px; 255 } 256 257 .DEAJ-card-noticia-info { 258 padding: 15px 15px 30px 15px; 259 display: flex; 260 flex-flow: column; 261 height: 100%; 262 } 263 264 .DEAJ-card-noticia-info h2 { 265 font-size: 1.375rem; 266 color: var(--deaj-dark-blue, #19325B); 267 line-height: 30px !important; 268 text-decoration: none !important; 269 margin: 0px; 270 } 271 272 .DEAJ-card-noticia-info a { 273 max-height: 190px; 274 overflow-y: hidden; 275 margin-bottom: 13px; 276 margin-top: 13px; 277 text-decoration: none !important; 278 } 279 280 .DEAJ-card-noticia-info a:hover h2 { 281 font-weight: bold; 282 text-decoration: underline !important; 283 } 284 285 .DEAJ-card-noticia-info-summary { 286 max-height: 126px; 287 overflow-y: hidden; 288 margin-bottom: 14px; 289 } 290 291 .DEAJ-card-noticia-info-summary p { 292 font-size: 1rem; 293 color: var(--deaj-text-color, #274A8A); 294 line-height: 21px; 295 } 296 297 .DEAJ-card-noticia-info-summary p:not(:last-child) { 298 margin-bottom: 14px; 299 } 300 301 .DEAJ-card-noticia-info-summary p:last-child { 302 margin-bottom: 0px; 303 } 304 305 .DEAJ-card-noticia-info-date { 306 font-size: 1rem; 307 color: #7F8DA3; 308 line-height: 21px; 309 margin-top: auto; 310 font-weight: 400; 311 } 312 313 .DEAJ-card-noticia-info-date i { 314 font-size: 1rem; 315 color: #7F8DA3; 316 line-height: 21px; 317 margin-right: 10px; 318 } 319</style>