We use cookies to personalize content, provide social media features and analyze traffic to our site. You give your consent to the use of cookies if you continue to use our websites. For more information, please read the page about our privacy policy.
Asset Publisher
An error occurred while processing the template.
Error on line 25, column 33 in 20155#20195#62615
saxReaderUtil.read(assetRenderer.getArticle().getContent()) is undefined.
It cannot be assigned to docXml
1<#macro img image> 
2	<#if image?has_content> 
3		<#assign etu = utilLocator.findUtil("messer-group-resources", "de.empulse.messer.templates.TemplateUtil") /> 
4		<#assign imageAltText = etu.getImageMetaData(etu.getFileEntryFromUrl(image), "alt-text", locale) /> 
5		<img class="mg-image" src="${image}" <#if imageAltText?has_content>alt="${imageAltText}"</#if> /> 
6	</#if> 
7</#macro> 
8 
9<#assign portletRequest = portalUtil.getLiferayPortletRequest(renderRequest) /> 
10<#assign portletResponse = portalUtil.getLiferayPortletResponse(renderResponse) /> 
11<#assign viewInContext = portletPreferences['assetLinkBehavior']?seq_contains("viewInPortlet")!false /> 
12 
13<div class="mg-default-article-teaser-list clearfix"> 
14	<#if entries?has_content> 
15		<#list entries as entry> 
16			<#assign assetRenderer = entry.getAssetRenderer() /> 
17			<#assign showReleaseDate = false /> 
18 
19            <#list entry.getTags() as tag> 
20                <#if tag.name == "press"> 
21                    <#assign showReleaseDate = true /> 
22                </#if> 
23            </#list> 
24			<#if assetRenderer.getClassName() == "com.liferay.portlet.journal.model.JournalArticle"> 
25				<#assign docXml = saxReaderUtil.read(assetRenderer.getArticle().getContent()) /> 
26			     
27			    <#assign teaser_text = docXml.valueOf("//dynamic-element[@name='teaser_text']/dynamic-content[@language-id='" + themeDisplay.getLanguageId() + "']/text()") /> 
28			    <#assign teaser_image = docXml.valueOf("//dynamic-element[@name='small_teaser_image']/dynamic-content[@language-id='" + themeDisplay.getLanguageId() + "']/text()") /> 
29			    <#assign moreLink = assetPublisherHelper.getAssetViewURL(portletRequest, portletResponse, entry, viewInContext) /> 
30			     
31			    			    <#if teaser_text == ""> 
32			       <#assign teaser_text = docXml.valueOf("//dynamic-element[@name='text']/dynamic-content[@language-id='" + themeDisplay.getLanguageId() + "']/text()") /> 
33			    </#if> 
34			     
35				<div class="row-fluid mg-item"> 
36					<#if teaser_image?has_content > 
37						<div class="span5"> 
38							<@img teaser_image /> 
39						</div> 
40					</#if> 
41					 
42					<#if teaser_image?has_content > 
43						<div class="span7"> 
44					<#else> 
45						<div class="span12"> 
46					</#if> 
47						<#if entry.getTitle(locale)?has_content > 
48							<h1 class="mg-spacer-headline">${entry.getTitle(locale)}</h1> 
49						</#if> 
50						<#if teaser_text?has_content > 
51						    <#if showReleaseDate> 
52						    <p> 
53						    <span style="color: rgb(0, 45, 115);">${assetRenderer.getDisplayDate()?date?string["dd.MM.yyyy"]}</span> 
54						    </p> 
55						    </#if> 
56							<p>${teaser_text}</p> 
57						</#if> 
58						 
59						<a class="btn mg-button" href="${moreLink}"> 
60							${themeDisplay.translate("more")} 
61						</a> 
62					</div> 
63				</div> 
64			</#if> 
65		</#list> 
66	</#if> 
67</div>