Search by

An error occurred while processing the template.
Method public java.lang.String com.liferay.portlet.journal.asset.JournalArticleAssetRenderer.getURLViewInContext(com.liferay.portal.kernel.portlet.LiferayPortletRequest,com.liferay.portal.kernel.portlet.LiferayPortletResponse,java.lang.String) throws java.lang.Exception threw an exception when invoked on com.liferay.portlet.journal.asset.JournalArticleAssetRenderer@5188328f
1<#assign themeHelperUtil = utilLocator.findUtil('bpc-csf-ct-generic-theme', 'com.bpc.csfactory.corporate.template.theme.ThemeHelper') /> 
2<#assign vocabularyUtil = utilLocator.findUtil('com.liferay.portlet.asset.service.AssetVocabularyLocalService') /> 
3 
4<#if entries?has_content> 
5    <#assign entriesSize = entries?size /> 
6    <div class="wrapper"> 
7            <#list entries as entry> 
8                <#assign assetRenderer = entry.getAssetRenderer() /> 
9                <#assign assetRendererFactory = assetRenderer.getAssetRendererFactory() > 
10                <#assign className = assetRenderer.getClassName() /> 
11                <#if className =="com.liferay.portlet.journal.model.JournalArticle" > 
12                    <#assign journalArticle = assetRenderer.getArticle() /> 
13                     
14                    <#assign viewURL = assetRenderer.getURLViewInContext(renderRequest, renderResponse, viewURL)! /> 
15                     
16                    <!-- tags --> 
17                    <#assign categories = entry.getCategories() /> 
18 
19                    <#assign entryTitle = htmlUtil.escape(assetRenderer.getTitle(locale)) /> 
20                     
21                    <#assign docXml = saxReaderUtil.read(journalArticle.getContentByLocale(locale)) /> 
22                    <#assign imageUrl = docXml.valueOf("//dynamic-element[@name='image']/dynamic-content/text()") /> 
23                    <#assign description = docXml.valueOf("//dynamic-element[@name='description']/dynamic-content/text()") /> 
24 
25                    <a href="${viewURL}" class="news-item"> 
26                        <#if imageUrl?has_content> 
27                            <img alt="${journalArticle.getTitle(locale)}" src="${httpUtil.decodeURL(htmlUtil.unescape(imageUrl))}"> 
28                        </#if>                         
29                        <h3>${journalArticle.getTitle(locale)}</h3> 
30                        <span class="date">${entry.publishDate?string("dd.MM.yyyy")}</span> 
31                        <p>${description}</p> 
32                        <span class="tags"> 
33                        <#if categories?has_content> 
34                        <#assign comma = 'false'/> 
35                        	<#list categories as category> 
36                        	<#assign vocabularyId = category.getVocabularyId()/> 
37                        	<#assign vocabularyName = vocabularyUtil.getVocabulary(vocabularyId).getName()/> 
38                        	<#if vocabularyName == 'News-tag'> 
39                            	<#if comma == 'true' > 
40
41                            	<#else> 
42                            	    Tags :  
43                            	    <#assign comma = 'true'/> 
44                            	</#if> 
45                            	<span>${category.getName()}</span> 
46                            </#if> 
47							</#list> 
48						</span> 
49						</#if> 
50						 
51                    </a> 
52                </#if> 
53            </#list> 
54        </div> 
55    </div> 
56</#if>