Events and activities
THE PURPOSE
The Museo Universidad de Navarra is an international center of public interest, for reflection and artistic creation, with an interdisciplinary, research, teaching and social character.
STAYCONNECTED
Receive mail with the latest news about exhibitions, events and much more. And follow us on social networks.
An error occurred while processing the template.
The following has evaluated to null or missing:
==> foto [in template "10136#10174#153676897" at line 150, column 118]
----
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: ${foto} [in template "10136#10174#153676897" at line 150, column 116]
----
1<#assign dateFormat = "dd|MM|yyyy">
2<#if (locale == "en_US")>
3 <#assign dateFormat = "yyyy|MM|dd">
4<#elseif (locale == "eu_ES")>
5 <#assign dateFormat = "MM|dd|yyyy">
6</#if>
7<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") />
8<#assign dlFileEntryLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService") />
9<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") />
10<#assign groupFriendlyURL = themeDisplay.getScopeGroup().getFriendlyURL() />
11<#assign friendlyURL = themeDisplay.getScopeGroup().getPathFriendlyURL(false,themeDisplay) + groupFriendlyURL />
12<#assign actualURLFriendly = portalUtil.getHost(request) + friendlyURL />
13<#assign PortalUtil = staticUtil["com.liferay.portal.kernel.util.PortalUtil"] />
14<#assign URLEncoder = staticUtil["java.net.URLEncoder"] />
15<#assign Normalizer = staticUtil["java.text.Normalizer"] />
16<#assign currentGroupSite = themeDisplay.getLayout().getGroup().getFriendlyURL() />
17<#if themeDisplay.getLayout().getPrivateLayout() == true >
18 <#assign state = themeDisplay.getPathFriendlyURLPrivateGroup()/>
19<#else>
20 <#assign state = themeDisplay.getPathFriendlyURLPublic()/>
21</#if>
22<#assign readMore = languageUtil.get(locale, "leer.mas")>
23<#assign instanceId = themeDisplay.getPortletDisplay().getId()?replace("com_liferay_asset_publisher_web_portlet_AssetPublisherPortlet_INSTANCE_", "")>
24<#assign originalInstanceId = themeDisplay.getPortletDisplay().getId()?replace("com_liferay_asset_publisher_web_portlet_AssetPublisherPortlet_INSTANCE_", "")>
25<#assign currentPageUrl = PortalUtil.getLayoutURL(themeDisplay.getLayout(),themeDisplay)>
26<#assign instanceId ="lovPblW1fC70">
27<#assign currentLayoutFriendlyUrl = themeDisplay.getLayoutFriendlyURL(themeDisplay.getLayout())>
28
29<#-- site_news_asset_publisher_instance_id name of the custom field for the asset publisher instance id of the site -->
30<#assign site_news_asset_publisher_instance_id = layout.getGroup().getExpandoBridge().getAttribute("site_news_asset_publisher_instance_id")>
31<#-- by default the main site asset publisher id -->
32<#assign site_news_asset_publisher_instance_id_default = layout.getGroup().getExpandoBridge().getAttributeDefault("site_news_asset_publisher_instance_id")>
33<#-- site_news_url name of the custom field url of the news page of the site -->
34<#assign site_news_url = themeDisplay.getScopeGroup().getExpandoBridge().getAttribute("site_news_url")>
35<#-- by default the main site news page -->
36<#assign site_news_url_default = themeDisplay.getScopeGroup().getExpandoBridge().getAttributeDefault("site_news_url")>
37
38
39 <#-- get site_news_url custom field value for the site -->
40<#list site_news_url?keys as key>
41 <#if key == locale>
42 <#assign site_news_url_value = site_news_url?values[key?index]>
43 </#if>
44</#list>
45
46<#-- get site_news_url custom field default value-->
47<#list site_news_url_default?keys as key>
48 <#if key == locale>
49 <#assign site_news_url_default_value = site_news_url_default?values[key?index]>
50 </#if>
51</#list>
52
53<#-- assign the url if the site has custom field. Use the default value otherwise-->
54<#if site_news_url_value??>
55<#else>
56 <#if site_news_url_default_value??>
57 <#assign site_news_url_value = site_news_url_default_value>
58 </#if>
59</#if>
60
61<#-- assign the instance id if the site has custom field. Use the default value otherwise-->
62<#if site_news_asset_publisher_instance_id??>
63<#else>
64 <#if site_news_asset_publisher_instance_id_default??>
65 <#assign site_news_asset_publisher_instance_id = site_news_asset_publisher_instance_id_default>
66 </#if>
67</#if>
68
69<#if entries?has_content>
70 <div class="container">
71 <div class="row">
72 <#list entries as curEntry>
73 <#assign article = journalArticleLocalService.fetchLatestArticle(curEntry.getClassPK()) />
74 <#assign assetRendererDate = curEntry.getAssetRenderer() />
75<#assign contentFecha = (article.displayDate?has_content?then(article.displayDate, article.modifiedDate))?date />
76
77 <#assign contentFechaURLString = contentFecha?date?string["dd/MM/yyyy"] />
78 <#assign contentFechaString = contentFecha?date?string["dd | MM | yyyy"] />
79 <#assign aArticleXML = saxReaderUtil.read(article.getContentByLocale(locale)) />
80 <#assign tituloNoticia = aArticleXML.valueOf("//dynamic-element[@name='Titulo_noticia']/dynamic-content/text()") />
81 <#assign entradilla = aArticleXML.valueOf("//dynamic-element[@name='subtitulo']/dynamic-content/text()") />
82 <#assign autorNombre = aArticleXML.valueOf("//dynamic-element[@name='Nombre_autor']/dynamic-content/text()") />
83 <#assign autorImagen = aArticleXML.valueOf("//dynamic-element[@name='Autor_imagen']/dynamic-content/text()") />
84 <#assign jsonObjectString = aArticleXML.valueOf("//dynamic-element[@name='Imagen']/dynamic-content/text()") />
85 <#assign idNoticia = curEntry.getClassPK()/>
86 <#assign video = aArticleXML.valueOf("//dynamic-element[@name='Video_youtube']/dynamic-content/text()") />
87 <#assign friendlyContentURL = assetPublisherHelper.getAssetViewURL(portalUtil.getLiferayPortletRequest(renderRequest), portalUtil.getLiferayPortletResponse(renderResponse), curEntry,true) />
88 <#assign tituloNoticiaEncoded = friendlyUrlDecode(tituloNoticia)>
89
90
91 <#-- Asset publisher instance id in main domain -->
92 <#assign mainDomainInstanceId = "lovPblW1fC70">
93 <#-- Urls generated always the same page for unav requirements-->
94 <#-- In main domain, go to main news page and use that asset publisher id. Causes issues with other domains -->
95 <#-- TODO: remove once custom fields are created-->
96 <#assign urlNews = languageUtil.get(locale, "url.news.details", "/noticias")>
97 <#assign instanceId = mainDomainInstanceId>
98
99 <#-- Configure url and asset publisher instance id with customFields-->
100 <#-- By default configured with main domain news page and asset publisher id. Other domains have to configure it manually in the site configuration -->
101 <#if site_news_url_value??>
102 <#assign urlNews = site_news_url_value>
103 </#if>
104 <#if site_news_asset_publisher_instance_id??>
105 <#assign instanceId = site_news_asset_publisher_instance_id>
106 </#if>
107
108 <#-- WORKAROUND FOR TEMPORAL SITES GO LIVE -->
109 <#-- lfr.cloud domain urls work differently, redirection to site news has to be adapted for it-->
110 <#if actualURLFriendly?contains("lfr.cloud")>
111 <#-- 1. Site with default news page. if using the default value, redirect to main site and use mainDomainInstanceId.-->
112 <#if site_news_url_default_value == site_news_url_value>
113 <#assign urlNews = site_news_url_value>
114 <#assign instanceId = mainDomainInstanceId>
115 <#else>
116 <#-- 2. Site with custom news page. if site site_news_url_value contains /web/site/, use site_news_url_value as is and use originalInstanceId to redirect within the site-->
117 <#if site_news_url_value?contains("/web"+groupFriendlyURL)>
118 <#assign urlNews = site_news_url_value>
119 <#assign instanceId = originalInstanceId>
120
121 <#-- 3. Site with custom domain and custom news page. if site site_news_url_value doesn't contain /web/site/ , prepend /web/site to it, to redirect within the site-->
122 <#else>
123 <#assign urlNews = "/web"+groupFriendlyURL + site_news_url_value>
124 <#assign instanceId = originalInstanceId>
125 </#if>
126 </#if>
127 </#if>
128
129 <#assign urlDetail = urlNews+"/-/contents/"+contentFechaURLString+"/"+tituloNoticiaEncoded+"/content/"+instanceId+"/"+curEntry.getEntryId()>
130
131 <#if validator.isNotNull(video)>
132 <#assign foto = "http://img.youtube.com/vi/"+video+"/0.jpg">
133 <#else>
134 <#if jsonObjectString?? && jsonObjectString?has_content>
135 <#attempt>
136 <#assign jsonObject = jsonObjectString?eval>
137 <#assign entryUuid = jsonObject.uuid />
138 <#assign entryGroupId = getterUtil.getLong(jsonObject.groupId) />
139 <#assign dlFileEntry = dlFileEntryLocalService.getDLFileEntryByUuidAndGroupId(entryUuid, entryGroupId) />
140 <#assign assetEntry = assetEntryLocalService.getEntry("com.liferay.document.library.kernel.model.DLFileEntry", dlFileEntry.fileEntryId) />
141 <#assign assetRenderer = assetEntry.assetRenderer />
142 <#assign foto = assetRenderer.getURLDownload(themeDisplay) />
143 <#recover>
144 <#assign foto = "" />
145 </#attempt>
146 </#if>
147 </#if>
148 <a id="${idNoticia}" class="col-xs-12 col-md-4 noticia-secundaria" href="${urlDetail}" alt="" title="">
149 <div class="col-xs-12 panel panel panel-default">
150 <div class="col-xs-12 col-sm-6 col-md-12 img-responsive noticia-img" style="background:url(${foto}) no-repeat"></div>
151 <div class="col-xs-12 col-sm-6 col-md-12 panel-body">
152 <p class="fecha">${dateUtil.getDate( (article.displayDate?? && article.displayDate?has_content)?then(article.displayDate?date, article.modifiedDate?date), dateFormat, locale)}</p>
153 <h3 class="titulo">
154 <#if (tituloNoticia?length > 200)>
155 ${newsTitle[0..199]}
156 <#else>
157 ${newsheadline}
158 </#if>
159 </h3>
160 <p class="visible-md visible-lg entradilla">
161 <#if (entradilla?length > 135)>
162 ${intro[0..134]}
163 <#else>
164 ${intro}
165 </#if>
166 </p>
167 </div>
168 <p class="col-xs-12 col-sm-6 col-sm-offset-6 col-md-12 col-md-offset-0 enlace">
169 <span href="${urlDetail}">${readMore}</span>
170 </p>
171 </div>
172 </a>
173 <#if validator.isNotNull(video)>
174 <!-- Modal de video -->
175 <div class="modal fade modal-unav" id="noticia_${idNoticia}_modal_video" tabindex="-1" role="dialog" aria-labelledby="exampleModalLongTitle" aria-hidden="true">
176 <div class="modal-dialog" role="document">
177 <div class="modal-content">
178 <div class="modal-body">
179 <button type="button" class="close" data-dismiss="modal" aria-label="Close">
180 <span aria-hidden="true">×</span>
181 </button>
182 <div class="embed-responsive embed-responsive-16by9">
183 <iframe class="embed-responsive-item" src="" id="noticia_${idNoticia}_video_iframe" allowscriptaccess="always" allow="autoplay"></iframe>
184 </div>
185 </div>
186 </div>
187 </div>
188 </div>
189 <script>
190 $(document).ready(function() {
191 var $videoSrc;
192 $('#${idNoticia}.modal_opener').click(function(e) {
193 e.preventDefault();
194 $videoSrc = $(this).getData()( "src" );
195 $("#noticia_${idNoticia}_video_iframe").attr('src',$videoSrc + "?autoplay=1&modestbranding=1&showinfo=0" );
196 });
197 $('#news_${newsID}_modal_video button').click(function(e) {
198 $("#noticia_${idNoticia}_video_iframe").attr('src', '');
199 });
200 });
201 </script>
202 </#if>
203 </#list>
204 </div>
205 </div>
206</#if>
207<#function friendlyUrlDecode title>
208 <#assign titleFriendly = title?replace("[^A-Za-z0-9À-ú ]", "", "r")?lower_case>
209 <#assign titleFriendly = titleFriendly?replace("á", "a", "r")>
210 <#assign titleFriendly = titleFriendly?replace("é", "e", "r")>
211 <#assign titleFriendly = titleFriendly?replace("í", "i", "r")>
212 <#assign titleFriendly = titleFriendly?replace("ó", "o", "r")>
213 <#assign titleFriendly = titleFriendly?replace("ú", "u", "r")>
214 <#assign titleFriendly = titleFriendly?replace("ñ", "n", "r")>
215 <#assign titleFriendly = URLEncoder.encode(titleFriendly)>
216 <#assign titleFriendly = titleFriendly?replace("\\+", "-","r")>
217 <#return titleFriendly>
218</#function>