artikkeli - Maaseutunuoret
An error occurred while processing the template.
The following has evaluated to null or missing: ==> entry.getAssetRenderer().getArticle [in template "46467" at line 235, column 45] ---- Tip: It's the step after the last dot 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: #local docXml = saxReaderUtil.read(en... [in template "46467" in function "getContentField" at line 235, column 9] - Reached through: #assign entryImage = ch5.getContentFi... [in template "20116#20152#131004" at line 16, column 2] ----
1<#-- MTK ajankohtaisvirran lista -->
2<#--- INIT --->
3
4<#-- Import common variables, functions & macros -->
5<#import "${templatesPath}/46467" as ch5>
6
7<#assign dlAppServiceUtil = serviceLocator.findService("com.liferay.document.library.kernel.service.DLAppService") />
8 <#--- OUTPUT --->
9 <@ch5.emptyListMessage />
10 <#if entries?has_content>
11 <div class="flex-container container-fluid FiMtkFrontTopicListkaikki">
12 <#assign fistcontent = "" />
13 <#--FiMtkFrontTopicListhyperlinkfirst-->
14 <#list entries as entry>
15 <#-- INIT ENTRY -->
16 <#assign entryImage = ch5.getContentField(entry, "image")?first!"">
17 <#assign entrySummary = ch5.getSummary(entry, ch5.summaryMaxLength)>
18 <#assign articleType = ch5.getCategoryNames(entry, ch5.articleTypeVocabularyId)?first!"" />
19 <#assign assetRenderer = entry.getAssetRenderer() />
20 <#assign vieURL = "" />
21 <#assign URLCurrent = themeDisplay.getURLCurrent()?length />
22 <#if 6 < URLCurrent >
23 <#assign vieURL = vieURL + "${themeDisplay.getURLCurrent()}/-/${assetRenderer.getUrlTitle()}" />
24 <#else>
25 <#assign vieURL = vieURL + "-/${assetRenderer.getUrlTitle()}" />
26 </#if>
27
28<#assign GroupLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.GroupLocalService")>
29<#assign mtkpaagroup = GroupLocalService.fetchGroup(entry.groupId) >
30
31
32 <a href="//${mtkpaagroup.getPublicLayoutSet().getVirtualHostname()}/-/${assetRenderer.getUrlTitle()}" class="FiMtkFrontTopicListhyperlink ${fistcontent}">
33 <div class="card card-inverse text-left FiMtkFrontTopicListjulkaisu ">
34 <#assign fistcontent = "" />
35 <#--<div class="card text-white FiMtkFrontTopicListimagehead">
36 -->
37 <#assign imageurl = "">
38 <#assign imagefileEntryId = "">
39 <#if entryImage?has_content>
40 <#assign entryImageJSON = entryImage?eval>
41 <#assign imageurl = "/o/adaptive-media/image/${entryImageJSON.fileEntryId}/thumbnail-600x/${entryImageJSON.name}">
42 <#assign imagefileEntryId = "${entryImageJSON.fileEntryId}">
43 <#else>
44 <#switch ch5.getStructureName(entry)>
45 <#case "Blogi">
46 <#assign imageurl = "/o/mtk-site-theme/css/placeholder-kuvat/blog.png">
47 <#break>
48 <#case "Tiedote">
49 <#assign imageurl = "/o/mtk-site-theme/css/placeholder-kuvat/Tiedote.png">
50 <#break>
51 <#case "Uutinen">
52 <#assign imageurl = "/o/mtk-site-theme/css/placeholder-kuvat/Uutinen.png">
53 <#break>
54 <#case "Ajankohtaista">
55 <#assign imageurl = "/o/mtk-site-theme/css/placeholder-kuvat/Tapahtuma.png">
56 <#break>
57 <#default>
58 <#assign imageurl = "/o/mtk-site-theme/css/placeholder-kuvat/Teematon.png">
59 </#switch>
60 </#if>
61 <#--<#if imagefileEntryId?has_content && imagefileEntryId != "">
62 <@adaptive_media_image["img"] fileVersion=dlAppServiceUtil.getFileEntry(imagefileEntryId?number).getFileVersion() class="card-img FiMtkFrontTopicListimage"/>
63 <#else>
64 <img class="card-img FiMtkFrontTopicListimage" src="${imageurl}?&imageThumbnail=3" alt="Card image">
65 </#if>-->
66 <div class="FiMtkFrontTopicListimageoverflow">
67 <img class="card-img FiMtkFrontTopicListimage" src="${imageurl}" alt="Card image">
68 </div>
69 <div class="card-img-overlay FiMtkFrontTopicListimageheadcategoria">
70 <h5 class="card-title FiMtkFrontTopicListimageheadcategoriatext">
71 ${ch5.getStructureName(entry)} </h5>
72 </div>
73 <#--</div>
74 -->
75 <div class="card-body FiMtkFrontTopicList">
76 <div class="FiMtkFrontTopicListdate">
77 ${ch5.getPublishDate(entry)} </div>
78 <div class="FiMtkFrontTopicListtitle">
79 <#assign title = ch5.getTitle(entry)>
80 <#if title?length < 75>
81 ${title} <#else>
82 ${title?substring(0, 74)} ... </#if>
83 </div>
84 </div>
85 </div>
86 </a>
87 <@ch5.articleeditlink entry "height: 0px; width: 0px; transform: translate(-30px, 7px);"/>
88 </#list>
89 </div>
90 </#if>