Julkaisuja-sarja 2006

Virhe tapahtui prosessoidessa esitysmallia.
Error on line 59, column 25 in 20154#20194#21802
journalStructureLocalService.getStructure(groupId, curArticle.getStructureId(), true ) is undefined.
It cannot be assigned to curArticleStructure
1<#-- 
2Application display templates can be used to modify the look of a 
3specific application. 
4 
5Please use the left panel to quickly add commonly used variables. 
6Autocomplete is also available and can be invoked by typing "${". 
7--> 
8 
9<#-- 
10    Services 
11--> 
12 
13<#assign lvmJournalGroupLocalService = serviceLocator.findService("lvm-site62-services-portlet", "com.ch5finland.lvm.site62.services.service.LvmJournalGroupLocalService") /> 
14 
15<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.portlet.journal.service.JournalArticleLocalService") /> 
16<#assign journalStructureLocalService = serviceLocator.findService("com.liferay.portlet.journal.service.JournalStructureLocalService") /> 
17 
18<#-- 
19    Support vars 
20--> 
21<#assign groupId = getterUtil.getLong(groupId) /> 
22<#assign count = 0 /> <#-- odd/even row counter --> 
23 
24<div class="n5list"> 
25 
26    <#if entries?has_content> 
27    <ul> 
28        <#assign firstEntry = entries?first /> 
29 
30        <#-- 
31            Dynamic scope & web-content 
32        --> 
33        <#if firstEntry.getClassName() == "com.liferay.portlet.journal.model.JournalArticle"> 
34             
35            <#list entries as curEntry> 
36    	        <#if (count % 2) == 0> 
37    	            <#assign class = "n5list-item-alternate" /> 
38    	        <#else> 
39    	            <#assign class = "n5list-item-default" /> 
40    	        </#if> 
41         
42                <li class="${class}"> 
43            	    <div class="listrow tiedote"> 
44 
45                	    <#-- Get view URL for entry --> 
46                	    <#assign assetRenderer = curEntry.getAssetRenderer() /> 
47                	    <#assign viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, curEntry) /> 
48                	    <#if assetLinkBehavior != "showFullContent"> 
49        		            <#assign viewURL = assetRenderer.getURLViewInContext(renderRequest, renderResponse, viewURL) /> 
50                	    </#if> 
51                 
52                        <#--  
53                	        Get journal entry & structure name with locale  
54                	        ID mapping: AssetEntry.classPK -> JournalArticle.resourcePrimKey 
55                	    --> 
56                	    <#assign classPK = getterUtil.getLong(curEntry.getClassPK()) /> 
57                 
58                        <#assign curArticle = journalArticleLocalService.getLatestArticle( classPK ) /> 
59                        <#assign curArticleStructure = journalStructureLocalService.getStructure(groupId, curArticle.getStructureId(), true ) /> 
60                        <#assign curArticleStructureName = curArticleStructure.getName(locale) /> 
61 
62<#assign fiUrl = lvmJournalGroupLocalService.getArticleLanguageUrl(curArticle.getId(), "fi") /> 
63<#assign svUrl = lvmJournalGroupLocalService.getArticleLanguageUrl(curArticle.getId(), "sv") /> 
64<#assign enUrl = lvmJournalGroupLocalService.getArticleLanguageUrl(curArticle.getId(), "en") /> 
65 
66                        <a href="${viewURL}">${curEntry.getTitle(locale)}</a> 
67                        <div class="spacer"></div> 
68                        <#-- tästä puuttuu vielä tyyppi (tiedote, uutinen, julkaisu) --> 
69                        <span class="type">${curArticleStructureName}</span><span class="date-time">${curEntry.getPublishDate()?string("dd.MM.yyyy HH.mm")}</span> 
70                        <span class="groupId" style="visibility:visible"> 
71                        <#-- jos tiedote, tänne kieliversiolinkit jos on saatavilla --> 
72            <#if fiUrl?has_content>                         
73            <span class="lang"><a href="/-/${fiUrl}">fi</a></span></#if> 
74            <#if svUrl?has_content>   
75            <span class="lang"><a href="/sv/-/${svUrl}">sv</a></span></#if> 
76            <#if enUrl?has_content>   
77            <span class="lang"><a href="/en/-/${enUrl}">en</a></span></#if> 
78 
79                        </span> 
80                    </div> 
81                </li> 
82                <#assign count = count + 1 /> 
83            </#list> 
84 
85        <#-- 
86            This display template does not support any other functionality. 
87        -->   
88        <#else> 
89            <div class="alert alert-error"><p>Odottamaton virhetilanne esitysmallissa. Tarkista portletin asetukset.</p></div> 
90        </#if> 
91         
92    </ul> 
93    </#if> 
94</div>