News header

News

Publicador de contenidos

angle-left Test article 1
Se ha producido un error al procesar la plantilla.
The following has evaluated to null or missing:
==> request['theme-display']  [in template "111755#111789#198730" at line 11, column 25]

----
Tip: It's the final [] step that caused this error, not those before it.
----
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: #assign themeDisplay = request["theme...  [in template "111755#111789#198730" at line 11, column 1]
----
1<#assign journalArticleResourceLocalServiceUtil = serviceLocator.findService("com.liferay.journal.service.JournalArticleResourceLocalService") /> 
2<#assign assetCategoryLocalServiceUtil = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService")> 
3<#assign assetTagLocalServiceUtil = serviceLocator.findService("com.liferay.asset.kernel.service.AssetTagLocalService")> 
4<#assign journalLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")> 
5 
6<#assign groupIdLong = getterUtil.getLong(groupId)> 
7<#assign contentId = .vars['reserved-article-id'].data> 
8<#assign articlePrimKey = journalLocalService.getArticle(groupIdLong, contentId).getResourcePrimKey()> 
9<#assign categoryList = assetCategoryLocalServiceUtil.getCategories("com.liferay.journal.model.JournalArticle" articlePrimKey) > 
10 
11<#assign themeDisplay = request['theme-display'] /> 
12<#assign locale = themeDisplay.locale /> 
13 
14<#assign dateSuffixes =["0th",  "1st",  "2nd",  "3rd",  "4th",  "5th",  "6th",  "7th",  "8th",  "9th", 
15	       "10th", "11th", "12th", "13th", "14th", "15th", "16th", "17th", "18th", "19th", 
16	       "20th", "21st", "22nd", "23rd", "24th", "25th", "26th", "27th", "28th", "29th", 
17	       "30th", "31st"] > 
18 
19<#assign newsDate_Data = getterUtil.getString(NewsDate.getData())> 
20<#if validator.isNotNull(newsDate_Data)> 
21	<#assign newsDate_DateObj = dateUtil.parseDate("yyyy-MM-dd", newsDate_Data, locale)> 
22 
23 
24	<#assign dia = dateUtil.getDate(newsDate_DateObj, "d", locale)> 
25	<#assign diaIni = dateSuffixes[dia?number]> 
26	<#assign mesIni = dateUtil.getDate(newsDate_DateObj, "MMMM", locale)> 
27	<#assign anioIni = dateUtil.getDate(newsDate_DateObj, "yyyy", locale)> 
28	<#assign dateIni = dateUtil.getDate(newsDate_DateObj, "MM/dd/yyyy", locale)> 
29 
30 
31	<#assign dateRealizacion = dateUtil.getDate(newsDate_DateObj, "MM/dd/yyyy", locale)> 
32 
33</#if> 
34 
35<div class="wrapper"> 
36 
37	<div class="box-news clearfix news-detail"> 
38		<div class="clearfix"> 
39			<button class="btn btn-default pull-right goBack" type="button"> 
40				<span class="lfr-btn-label">Go back</span> 
41			</button> 
42		</div> 
43		<!--Categorías--> 
44		<div class="box-tags"> 
45			<#list categoryList as categoryItem> 
46				<div> 
47					<span>${categoryItem.name}</span> 
48				</div> 
49			</#list> 
50		</div> 
51		<#if (dateRealizacion != "")> 
52			<div class="item_content_fecha-hora"> 
53				<span> 
54					${diaIni} ${mesIni} ${anioIni} 
55				</span> 
56			</div> 
57		</#if> 
58		<#if NewsTitle.getData() != ""> 
59			<div class="item_content_title">${NewsTitle.getData()}</div> 
60		</#if> 
61 
62		<#if MainVideo.getData() != ""> 
63			<div class="item_content_video"> 
64				<div style="position:relative;height:0;padding-bottom:75.0%;margin-bottom:0.5em;"><iframe src='${MainVideo.getData()}' width="480" height="360" frameborder="0" style="position:absolute;width:100%;height:100%;left:0" allowfullscreen></iframe></div> 
65			</div> 
66		<#else> 
67			<#if MainImage.getData() != ""> 
68				<div class="main-image"> 
69					<img src="${MainImage.getData()}" alt="${MainImage.getAttribute("alt")}" > 
70				</div> 
71		  	</#if> 
72		</#if> 
73 
74 
75		<#if NewsSubtitle.getData() != ""> 
76			<div class="item_content_subtitle">${NewsSubtitle.getData()}</div> 
77		</#if> 
78 
79		<#if (validator.isNotNull(newsContent) && (newsContent.getSiblings()?has_content))> 
80			<#list newsContent.getSiblings() as cur_newsContent> 
81			    <#if cur_newsContent.getData() != ""> 
82				    <div class="item_content_html">${cur_newsContent.getData()}</div> 
83				</#if> 
84				<#if cur_newsContent.getChildren()?has_content> 
85					<#list cur_newsContent.getSiblings() as subcur_newsContent> 
86						<#if subcur_newsContent.Video.getData() != ""> 
87							<div class="item_content_video"> 
88								<div style="position:relative;height:0;padding-bottom:75.0%"><iframe src='${subcur_newsContent.Video.getData()}' width="480" height="360" frameborder="0" style="position:absolute;width:100%;height:100%;left:0" allowfullscreen></iframe></div> 
89							</div> 
90						<#else> 
91							<#if subcur_newsContent.Image.getData() != ""> 
92								<div class="item_content_image"> 
93									<img src="${subcur_newsContent.Image.getData()}" alt="${subcur_newsContent.Image.getAttribute("alt")}"> 
94								</div> 
95							</#if> 
96						</#if> 
97 
98						<#if subcur_newsContent.URLlinkButton.getData() != ""> 
99							<div id="item_content_linkbuttons"> 
100								<a class="av-button" href="${subcur_newsContent.URLlinkButton.getData()}"> 
101								<#if subcur_newsContent.URLlinkButton.getChildren()?has_content> 
102									<#list subcur_newsContent.URLlinkButton.getSiblings() as cur_text > 
103										<#if cur_text.textButton.getData() != ""> 
104										${cur_text.textButton.getData()} 
105										</#if> 
106									</#list> 
107								</#if> 
108								</a> 
109							</div> 
110						</#if> 
111 
112					</#list> 
113				</#if> 
114			</#list> 
115		</#if> 
116		 
117<#assign otherImageHasContent = false> 
118<#list OtherImage.getSiblings() as cur_OtherImage> 
119            <#if cur_OtherImage.getData()?has_content>          
120                        <#assign otherImageHasContent = true> 
121            </#if>    
122</#list> 
123 
124 
125 
126		<#if (validator.isNotNull(OtherImage) && (otherImageHasContent))> 
127			<div class="imgGallery"> 
128				<div id="sliderNav" class="slider-nav"> 
129					<#list OtherImage.getSiblings() as cur_OtherImage> 
130					    <#if cur_OtherImage.getData() != ""> 
131						    <figure> 
132								<img alt="${cur_OtherImage.getAttribute("alt")}" src="${cur_OtherImage.getData()}" /> 
133							</figure> 
134						</#if> 
135					</#list> 
136				</div> 
137			</div> 
138			<div class="fullwidth-imgGallery hiddenGallery"> 
139				<div id="sliderFor" class="slider-for"> 
140					<#list OtherImage.getSiblings() as cur_OtherImage> 
141					    <#if cur_OtherImage.getData() != ""> 
142						    <figure> 
143								<img alt="" src="${cur_OtherImage.getData()}" /> 
144							</figure> 
145						</#if> 
146					</#list> 
147				</div> 
148			</div> 
149 
150		</#if> 
151	</div> 
152</div> 
153<script type="text/javascript"> 
154	function elemPos(){ 
155		$('#sliderFor').slick('setPosition'); 
156		var wLeft = $("#sliderFor").width() / 2; var posLeft = "calc(50% - " + wLeft + "px)"; 
157		$("#sliderFor").css("left", posLeft); 
158		var hTop = ($("#sliderFor").height() / 2) + 6 ; var posTop = "calc(50% - " + hTop + "px)"; 
159		$("#sliderFor").css("top", posTop); 
160
161 
162	function closeButton(){ 
163		if ($('#closeGallery').length>0) {}else{ 
164			$('<a href="javascript:void(0);" id="closeGallery"><i class="icon-remove"></i></a>').insertBefore("#sliderFor .slick-list"); 
165
166		$("#closeGallery").click(function(){ 
167			$(".fullwidth-imgGallery").addClass("hiddenGallery"); 
168		}); 
169
170 
171	function initImgGallery(){ 
172		$('.slider-for').slick({ 
173			slidesToShow: 1, 
174			slidesToScroll: 1, 
175			arrows: false, 
176			dots: true, 
177			fade: true, 
178			asNavFor: '.slider-nav', 
179		    swipe: true, 
180		    swipeToSlide: true, 
181		    adaptiveHeight:true 
182		}); 
183 
184		$('#sliderFor').on('init', function(slick){ 
185			elemPos(); 
186		}); 
187	    $('#sliderFor').on('afterChange', function(slick, currentSlide){ 
188			elemPos(); 
189		}); 
190 
191 
192		$('.slider-nav').slick({ 
193	  			centerMode: true, 
194				centerPadding: '60px', 
195				/*slidesToShow: 3,*/ 
196				slidesToScroll: 1, 
197				asNavFor: '.slider-for', 
198			  	dots: false, 
199			  	focusOnSelect: true, 
200			  	swipe: true, 
201		    	swipeToSlide: true, 
202		    	variableWidth: true, 
203	  			prevArrow: '<button type="button" data-role="none" class="slick-prev" aria-label="Previous" tabindex="0" role="button"><span class="text">Previous</span></button>', 
204		        nextArrow: '<button type="button" data-role="none" class="slick-next" aria-label="Next" tabindex="0" role="button"><span class="text">Next</span></button>', 
205 
206				responsive: [ 
207
208			            breakpoint: 768, 
209			            settings: { 
210		                    variableWidth: false, 
211		                    slidesToShow: 1, 
212							slidesToScroll: 1, 
213							fade: true, 
214						    swipe: true, 
215						    swipeToSlide: true, 
216						    centerMode: false, 
217							centerPadding: '0' 
218
219
220
221			}); 
222		$(".slick-slide *").click(function(){ 
223			$(".fullwidth-imgGallery").removeClass("hiddenGallery"); 
224			closeButton(); 
225			/*elemPos();*/ 
226		}); 
227
228 
229 
230 
231	$(document).ready(function() { 
232		if ($('#sliderNav').length>0) { 
233			initImgGallery(); 
234
235	}); 
236 
237	$(window).resize(function(){ 
238		elemPos(); 
239	}); 
240 
241</script>