Julkaisuja-sarja 2006

Virhe tapahtui prosessoidessa esitysmallia.
Error on line 56, 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<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.portlet.journal.service.JournalArticleLocalService") /> 
13<#assign journalStructureLocalService = serviceLocator.findService("com.liferay.portlet.journal.service.JournalStructureLocalService") /> 
14 
15<#-- 
16    Support vars 
17--> 
18<#assign groupId = getterUtil.getLong(groupId) /> 
19<#assign count = 0 /> <#-- odd/even row counter --> 
20 
21<div class="n5list"> 
22 
23    <#if entries?has_content> 
24    <ul> 
25        <#assign firstEntry = entries?first /> 
26 
27        <#-- 
28            Dynamic scope & web-content 
29        --> 
30        <#if firstEntry.getClassName() == "com.liferay.portlet.journal.model.JournalArticle"> 
31             
32            <#list entries as curEntry> 
33    	        <#if (count % 2) == 0> 
34    	            <#assign class = "n5list-item-alternate" /> 
35    	        <#else> 
36    	            <#assign class = "n5list-item-default" /> 
37    	        </#if> 
38         
39                <li class="${class}"> 
40            	    <div class="listrow tiedote"> 
41 
42                	    <#-- Get view URL for entry --> 
43                	    <#assign assetRenderer = curEntry.getAssetRenderer() /> 
44                	    <#assign viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, curEntry) /> 
45                	    <#if assetLinkBehavior != "showFullContent"> 
46        		            <#assign viewURL = assetRenderer.getURLViewInContext(renderRequest, renderResponse, viewURL) /> 
47                	    </#if> 
48                 
49                        <#--  
50                	        Get journal entry & structure name with locale  
51                	        ID mapping: AssetEntry.classPK -> JournalArticle.resourcePrimKey 
52                	    --> 
53                	    <#assign classPK = getterUtil.getLong(curEntry.getClassPK()) /> 
54                 
55                        <#assign curArticle = journalArticleLocalService.getLatestArticle( classPK ) /> 
56                        <#assign curArticleStructure = journalStructureLocalService.getStructure(groupId, curArticle.getStructureId(), true ) /> 
57                        <#assign curArticleStructureName = curArticleStructure.getName(locale) /> 
58 
59                        <a href="${viewURL}">${curEntry.getTitle(locale)}</a> 
60                        <div class="spacer"></div> 
61                        <#-- tästä puuttuu vielä tyyppi (tiedote, uutinen, julkaisu) --> 
62                        <span class="type">${curArticleStructureName}</span><span class="date-time">${curEntry.getPublishDate()?string("dd.MM.yyyy HH.mm")}</span> 
63                        <span class="groupId" style="visibility:visible"> 
64                        <#-- jos tiedote, tänne kieliversiolinkit jos on saatavilla 
65                            <span class="lang"><a href="#">fi</a></span> 
66                            <span class="lang"><a href="#">sv</a></span> 
67                            <span class="lang"><a href="#">en</a></span> 
68                        --> 
69                        </span> 
70                    </div> 
71                </li> 
72                <#assign count = count + 1 /> 
73            </#list> 
74 
75        <#-- 
76            This display template does not support any other functionality. 
77        -->   
78        <#else> 
79            <div class="alert alert-error"><p>Odottamaton virhetilanne esitysmallissa. Tarkista portletin asetukset.</p></div> 
80        </#if> 
81         
82    </ul> 
83    </#if> 
84</div>