News & Presse

Unsere News und Pressemitteilungen informieren Sie ĂŒber die wichtigsten Neuigkeiten aus Ihrer BKS Bank.

Fehler bei der Verarbeitung der Vorlage.
Java method "static com.liferay.document.library.kernel.service.DLAppLocalServiceUtil.getFileEntry(long)" threw an exception; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: fileEntry = DLAppLocalServiceUtil.get...  [in template "20116#20152#34051" in function "setImgUrlFromImageObjectString" at line 237, column 25]
	- Reached through: @ait_contentreplacer["replace-content"]  [in template "20116#20152#34051" at line 12, column 1]
----
1<#assign 
2	ait_contentreplacer = taglibLiferayHash["/META-INF/ait-contentreplacer.tld"] 
3 
4	journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") 
5	languageUtil = serviceLocator.findService("com.liferay.portal.kernel.language.LanguageUtil") 
6	webKeys = staticUtil["com.liferay.portal.kernel.util.WebKeys"] 
7 
8	DLAppLocalServiceUtil = staticUtil["com.liferay.document.library.kernel.service.DLAppLocalServiceUtil"] 
9	dlUtil = staticUtil["com.liferay.document.library.kernel.util.DLUtil"] 
10/> 
11 
12<@ait_contentreplacer["replace-content"]> 
13 
14	<#assign 
15		defaultDateFormat = "dd.MM.yyyy" 
16        linkText = "Mehr Informationen" 
17	/> 
18 
19	<#-- Pagination --> 
20	<style> 
21		#_${themeDisplay.getPortletDisplay().getId()}_ocerSearchContainerPageIterator 
22		.lfr-pagination { 
23			display: none; 
24
25	</style> 
26 
27	<script> 
28		var ready = (callback) => { 
29			if (document.readyState != "loading") callback(); 
30			else document.addEventListener("DOMContentLoaded", callback); 
31
32 
33		ready(() => { 
34			// configs 
35			let min = 5; 
36			let max = 5; 
37			let pageCountConfig = min + max; 
38 
39			// create new pagination objects 
40			let newsPaginationNode = document.createElement('div'); 
41			newsPaginationNode.classList.add('news-pagination'); 
42 
43			let paginationDesktop = document.createElement('ul'); 
44			paginationDesktop.classList.add('pagination', 'pag-desktop', 'hidden-xs'); 
45			newsPaginationNode.append(paginationDesktop); 
46 
47			let paginationMobile = document.createElement('ul'); 
48			paginationMobile.classList.add('pagination', 'pag-mobile', 'visible-xs-inline-block'); 
49			newsPaginationNode.append(paginationMobile); 
50 
51			document.querySelector('.taglib-page-iterator').prepend(newsPaginationNode) 
52			 
53			// get the current page 
54			let searchParam = window.location.search; 
55			let regEx = /_cur=(\d+)/; 
56			let cur = 1; 
57			if (searchParam && searchParam !== '') { 
58				cur = parseInt(regEx.exec(searchParam)[1]); 
59
60			 
61			// get previous and next button 
62			let previousButton = document.querySelector('.lfr-pagination-buttons li:nth-child(2)'); 
63			previousButton.querySelector('a').innerHTML = '<svg aria-hidden="true" class="lexicon-icon"><use xlink:href="#icon_arrow_alt_left" /></svg>'; 
64			previousButton.querySelector('a').classList.add('pagination-icon') 
65 
66			let nextButton = document.querySelector('.lfr-pagination-buttons li:nth-child(3)'); 
67			nextButton.querySelector('a').innerHTML = '<svg aria-hidden="true" class="lexicon-icon"><use xlink:href="#icon_arrow_alt_right" /></svg>'; 
68			nextButton.querySelector('a').classList.add('pagination-icon') 
69 
70			// create Desktop version 
71			let paginationLinks = document.querySelectorAll('.lfr-pagination-page-selector li'); 
72			paginationLinks.forEach(function(el){  
73				el.removeAttribute("role");  
74				el.classList.add('page-item'); 
75				el.querySelector('a').classList.add('page-link'); 
76				let linkLabel = el.querySelector('a span').textContent; 
77				el.querySelector('a').href = el.querySelector('a').href.replace(/_cur=\d+/g, '_cur=' + linkLabel); 
78			}); 
79			let pageCount = paginationLinks.length; 
80 
81			// mark current item as active 
82			paginationLinks[cur-1].classList.add('active') 
83 
84 
85			if (pageCount > pageCountConfig) { 
86				// remove left arrow / only show right arrow 
87				if ((cur-(min + 1)) < 0 ) { 
88					var trimPagLinks = [...paginationLinks].slice(Math.max(0, cur-(min + 1)), cur + max + 1); 
89					trimPagLinks.forEach(function(el){paginationDesktop.append(el)}) 
90					trimPagLinks[trimPagLinks.length-1].querySelector('a').innerHTML = '<svg aria-hidden="true" class="lexicon-icon"><use xlink:href="#icon_arrow_alt_right" /></svg>'; 
91					trimPagLinks[trimPagLinks.length-1].querySelector('a').classList.add('pagination-icon') 
92 
93				// remove right arrow / only show left arrow 
94				} else if ((cur+max + 1) > pageCount) { 
95					let trimPagLinks = [...paginationLinks].slice(Math.max(0, cur-(min + 2)), cur + max); 
96					trimPagLinks.forEach(function(el){paginationDesktop.append(el)}) 
97					trimPagLinks[0].querySelector('a').innerHTML = '<svg aria-hidden="true" class="lexicon-icon"><use xlink:href="#icon_arrow_alt_left" /></svg>'; 
98					trimPagLinks[0].querySelector('a').classList.add('pagination-icon') 
99 
100				// show left and right arrows 
101				} else { 
102					let trimPagLinks = [...paginationLinks].slice(Math.max(0, cur-(min + 2)), cur + max + 1); 
103					trimPagLinks.forEach(function(el){paginationDesktop.append(el)}) 
104					 
105					if ((cur-min) !== 1) { 
106						trimPagLinks[0].querySelector('a').innerHTML = '<svg aria-hidden="true" class="lexicon-icon"><use xlink:href="#icon_arrow_alt_left" /></svg>'; 
107						trimPagLinks[0].querySelector('a').classList.add('pagination-icon'); 
108
109					 
110					trimPagLinks[trimPagLinks.length-1].querySelector('a').innerHTML = '<svg aria-hidden="true" class="lexicon-icon"><use xlink:href="#icon_arrow_alt_right" /></svg>'; 
111					trimPagLinks[trimPagLinks.length-1].querySelector('a').classList.add('pagination-icon') 
112
113			} else { 
114				paginationLinks.forEach(function(el){paginationDesktop.append(el)}) 
115
116			 
117			// create Mobile Version 
118			let previousButtonMobile = previousButton.cloneNode(true) 
119			previousButtonMobile.classList.add('page-item') 
120			previousButtonMobile.querySelector('a').classList.add('page-link') 
121			paginationMobile.append(previousButtonMobile); 
122 
123			let currentPageNode = document.createElement('li') 
124			currentPageNode.classList.add('page-item') 
125			currentPageNode.innerHTML = '<span>'+cur+'</span>' 
126			paginationMobile.append(currentPageNode) 
127 
128			let nextButtonMobile = nextButton.cloneNode(true) 
129			nextButtonMobile.classList.add('page-item') 
130			nextButtonMobile.querySelector('a').classList.add('page-link') 
131			paginationMobile.append(nextButtonMobile); 
132		}); 
133	</script> 
134 
135	<#-- Rendering --> 
136	<#if !entries?has_content> 
137		<#if !themeDisplay.isSignedIn()> 
138			${renderRequest.setAttribute("PORTLET_CONFIGURATOR_VISIBILITY", true)} 
139		</#if> 
140 
141		<div class="alert alert-info"> 
142			<@liferay_ui["message"] key="no-entries-were-found" /> 
143		</div> 
144	<#else> 
145		<div class="content-list news-list"> 
146			<#list entries as entry> 
147				<#assign 
148				entry = entry 
149 
150				assetRenderer = entry.getAssetRenderer() 
151 
152				entryClassName = assetRenderer.getClassName() 
153 
154				entryTitle = htmlUtil.escape(assetRenderer.getTitle(locale)) 
155 
156				viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, assetRenderer, entry, !stringUtil.equals(assetLinkBehavior, "showFullContent")) 
157				/> 
158		 
159				<#if stringUtil.equals(entryClassName, "com.liferay.journal.model.JournalArticle")> 
160 
161					<#assign 
162						journalArticle = assetRenderer.getArticle() 
163 
164						articleDocument = saxReaderUtil.read(journalArticle.getContent()) 
165						articleRootElement = articleDocument.getRootElement() 
166					 
167						articleImage = "" 
168						articleImageAlt = "" 
169						articleHeading = "" 
170						articleSummary = "" 
171
172 
173					<#list articleRootElement.elements() as dynamicElement> 
174						<#switch dynamicElement.attributeValue("name")> 
175							<#case "Image"> 
176								<#assign articleImageAlt = setImgDescriptionFromImageObjectString(dynamicElement.element("dynamic-content").getText())> 
177								<#assign articleImage = setImgUrlFromImageObjectString(dynamicElement.element("dynamic-content").getText())> 
178								<#break> 
179							<#case "Heading"> 
180								<#assign 
181									articleHeading = dynamicElement.element("dynamic-content").getText() 
182                                    articleHeadingType = dynamicElement.attributeValue("type") 
183								/> 
184								<#break> 
185							<#case "Summary"> 
186								<#assign articleSummary = dynamicElement.element("dynamic-content").getText()> 
187								<#if articleSummary?length &gt; 400> 
188									<#assign articleSummary = articleSummary?substring(0,400) + " &hellip;"> 
189								</#if> 
190								<#break> 
191						</#switch> 
192					</#list> 
193				 
194					<div class="content-list-item news-list-item"> 
195						<div class="lfr-portal-asset-edit-tooltip"> 
196								<@getEditIcon /> 
197						</div> 
198						<div class="news-item"> 
199							<#if articleImage?? && articleImage != ""> 
200								<div class="news-item-col-image"> 
201									<div class="news-item-image aspect-ratio"> 
202										<img class="aspect-ratio-item aspect-ratio-item-top-center" alt="${articleImageAlt}" src="${articleImage}" /> 
203									</div> 
204								</div> 
205							</#if> 
206							<div class="news-item-col-content"> 
207								<div class="news-item-content"> 
208									<p class="news-item-info">NEWS - <@getMetadataField fieldName="publish-date" /></p> 
209									<div class="news-item-title"> 
210		                                <#if articleHeadingType != 'text'> 
211		                                    ${articleHeading} 
212		                                <#else> 
213											<h2>${articleHeading}</h2> 
214		                                </#if> 
215									</div> 
216									<p class="news-item-text">${articleSummary}</p> 
217									<a class="news-item-btn btn btn-secondary" href="${viewURL}" title="<@liferay.language key="read-more" />">${linkText} <svg aria-hidden="true" class="lexicon-icon scale-lexicon-icon icon-btn-right"><use xlink:href="#icn_arrow-right" /></svg></a> 
218								</div> 
219							</div> 
220						</div> 
221					</div> 
222				<#else> 
223					<#if themeDisplay.isSignedIn()> 
224						<div class="alert alert-warning"> 
225							<@liferay_ui["message"] key="asset-type" /> <@liferay_ui["message"] key="not-supported" /> 
226						</div> 
227					</#if> 
228				</#if> 
229			</#list> 
230		</div> 
231	</#if> 
232 
233	<#function setImgUrlFromImageObjectString objectString> 
234		<#if objectString?has_content && !stringUtil.equals(objectString, "") > 
235			<#assign 
236			imgObjMap = jsonFactoryUtil.looseDeserialize(objectString) 
237			fileEntry = DLAppLocalServiceUtil.getFileEntry(imgObjMap.fileEntryId?number) 
238 
239			imgPath = dlUtil.getDownloadURL( 
240			fileEntry, 
241			fileEntry.getFileVersion(), 
242			themeDisplay, 
243			"download=false", 
244			false, 
245			false 
246
247			/> 
248			<#return imgPath> 
249		<#else> 
250			<#return ""> 
251		</#if> 
252	</#function> 
253 
254	<#function setImgDescriptionFromImageObjectString objectString> 
255		<#if objectString?has_content && !stringUtil.equals(objectString, "") > 
256			<#assign 
257			imgObjMap = jsonFactoryUtil.looseDeserialize(objectString) 
258 
259			imgDescription = imgObjMap.alt 
260			/> 
261			<#return imgDescription> 
262		<#else> 
263			<#return ""> 
264		</#if> 
265	</#function> 
266 
267	<#macro getEditIcon> 
268		<#if assetRenderer.hasEditPermission(themeDisplay.getPermissionChecker())> 
269			<#assign editPortletURL = assetRenderer.getURLEdit(renderRequest, renderResponse, windowStateFactory.getWindowState("NORMAL"), themeDisplay.getURLCurrent())!"" /> 
270 
271			<#if validator.isNotNull(editPortletURL)> 
272				<#assign title = languageUtil.format(locale, "edit-x", entryTitle, false) /> 
273 
274				<@liferay_ui["icon"] 
275					cssClass="icon-monospaced visible-interaction" 
276					icon="pencil" 
277					markupView="lexicon" 
278					message=title 
279					url=editPortletURL.toString() 
280				/> 
281			</#if> 
282		</#if> 
283	</#macro> 
284 
285	<#macro getMetadataField 
286		fieldName 
287
288		<#if stringUtil.split(metadataFields)?seq_contains(fieldName)> 
289			<span class="metadata-entry metadata-${fieldName}"> 
290				<#assign dateFormat = defaultDateFormat /> 
291 
292				<#if stringUtil.equals(fieldName, "author")> 
293					<@liferay.language key="by" /> ${htmlUtil.escape(portalUtil.getUserName(assetRenderer.getUserId(), assetRenderer.getUserName()))} 
294				<#elseif stringUtil.equals(fieldName, "categories")> 
295					<@liferay_ui["asset-categories-summary"] 
296					className=entry.getClassName() 
297					classPK=entry.getClassPK() 
298					portletURL=renderResponse.createRenderURL() 
299					/> 
300				<#elseif stringUtil.equals(fieldName, "create-date")> 
301					${dateUtil.getDate(entry.getCreateDate(), dateFormat, locale)} 
302				<#elseif stringUtil.equals(fieldName, "expiration-date")> 
303					${dateUtil.getDate(entry.getExpirationDate(), dateFormat, locale)} 
304				<#elseif stringUtil.equals(fieldName, "modified-date")> 
305					${dateUtil.getDate(entry.getModifiedDate(), dateFormat, locale)} 
306				<#elseif stringUtil.equals(fieldName, "priority")> 
307					${entry.getPriority()} 
308				<#elseif stringUtil.equals(fieldName, "publish-date")> 
309					${dateUtil.getDate(entry.getPublishDate(), dateFormat, locale)} 
310				<#elseif stringUtil.equals(fieldName, "tags")> 
311					<@liferay_ui["asset-tags-summary"] 
312					className=entry.getClassName() 
313					classPK=entry.getClassPK() 
314					portletURL=renderResponse.createRenderURL() 
315					/> 
316				<#elseif stringUtil.equals(fieldName, "view-count")> 
317					${entry.getViewCount()} <@liferay.language key="views" /> 
318				</#if> 
319			</span> 
320		</#if> 
321	</#macro> 
322 
323</@> 
Bettina Kugi

Ihre Ansprechpartnerin

Bettina Kugi
BKS Bank AG, VorstandsbĂŒro
Beauftragte fĂŒr Öffentlichkeitsarbeit

T: +43 463 5858-115
E: bettina.kugi@bks.at