Sisältöjulkaisija

Virhe tapahtui prosessoidessa esitysmallia.
Can't convert this string to number: "2/ajankohtaiset"
The blamed expression:
==> pageFromUrl?number  [in template "194318#194346#208136" at line 28, column 28]

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign currentPage = pageFromUrl?number  [in template "194318#194346#208136" at line 28, column 5]
----
1<#assign 
2    archivePageURL = themeDisplay.getPortalURL() + themeDisplay.getURLCurrent()?keep_before_last("?") 
3    categoryFromUrl = themeDisplay.getURLCurrent()?keep_after_last("category=")?keep_before_last("&") 
4    pageFromUrl = themeDisplay.getURLCurrent()?keep_after_last("page=") 
5    splitter = "&" 
6 
7    categoryAll = "all" 
8    categoryNews = "news" 
9    categoryEvents = "events" 
10    categoryStudies = "studies" 
11 
12    categoryTitleNews = "Uutinen" 
13    categoryTitleEvents = "Tapahtuma" 
14    categoryTitleStudies = "Tutkimus" 
15 
16    categoryUrlAll = archivePageURL  + "?category=" + categoryAll 
17    categoryUrlNews = archivePageURL + "?category=" + categoryNews 
18    categoryUrlEvents = archivePageURL + "?category=" + categoryEvents 
19    categoryUrlStudies = archivePageURL + "?category=" + categoryStudies 
20 
21    currentCategory = categoryFromUrl 
22    currentCategoryTitle = "" 
23    currentCategoryUrl = "" 
24    currentPage = 1 
25/> 
26 
27<#if pageFromUrl != ""> 
28    <#assign currentPage = pageFromUrl?number> 
29</#if> 
30 
31<#if currentCategory == categoryNews> 
32    <#assign 
33        currentCategoryUrl = categoryUrlNews 
34        currentCategoryTitle = categoryTitleNews 
35    /> 
36<#elseif currentCategory == categoryEvents> 
37    <#assign 
38        currentCategoryUrl = categoryUrlEvents 
39        currentCategoryTitle = categoryTitleEvents 
40    /> 
41<#elseif currentCategory == categoryStudies> 
42    <#assign 
43        currentCategoryUrl = categoryUrlStudies 
44        currentCategoryTitle = categoryTitleStudies 
45    /> 
46<#elseif currentCategory == categoryAll> 
47    <#assign 
48        currentCategoryUrl = categoryUrlAll 
49    /> 
50<#else> 
51    <#assign 
52        currentCategory = categoryAll 
53        currentCategoryUrl = categoryUrlAll 
54    /> 
55</#if> 
56 
57<!-- PAGE LINKS --> 
58<#assign 
59    previousPage = currentCategoryUrl + splitter + "page=" + (currentPage - 1) 
60    nextPage = currentCategoryUrl + splitter + "page=" + (currentPage + 1) 
61/> 
62 
63<#if currentPage <= 2> 
64    <#assign previousPage = currentCategoryUrl + splitter + "page=" + 1> 
65</#if> 
66 
67<!-- SHOW WANTED AMOUNT OF TOPICS --> 
68<#assign 
69    itemsShowing = 8 
70    firstItemShowing = (currentPage - 1) * itemsShowing 
71    lastItemShowing = currentPage * itemsShowing - 1 
72/> 
73 
74<!-- FILTER THE RESULTS BASED ON CHOSEN CATEGORY --> 
75<#function categoryFilter(curEntry)> 
76 
77    <#assign 
78        assetRenderer = curEntry.getAssetRenderer() 
79        docXml = saxReaderUtil.read(assetRenderer.getArticle().getContent()) 
80        rootElement = docXml.getRootElement() 
81        curEntryCategory = "" 
82    /> 
83 
84    <#list rootElement.elements() as dynamicElement> 
85        <#if dynamicElement.attributeValue("name") == "topicCategory"> 
86            <#assign curEntryCategory = dynamicElement.element("dynamic-content").getText()> 
87        </#if> 
88    </#list> 
89 
90    <#return (currentCategoryTitle == curEntryCategory) || (currentCategory == categoryAll)> 
91</#function> 
92 
93<#if entries?has_content> 
94 
95    <div class="row psshp_category-buttons"> 
96        <a href="${categoryUrlAll + splitter + "page=" + 1}">Kaikki</a> 
97        <a href="${categoryUrlNews + splitter + "page=" + 1}">Uutiset</a> 
98        <a href="${categoryUrlEvents + splitter + "page=" + 1}">Tapahtumat</a> 
99        <a href="${categoryUrlStudies + splitter + "page=" + 1}">Tutkimukset</a> 
100    </div> 
101 
102    <div class="psshp_topics-page"> 
103        <#list entries?filter(categoryFilter) as curEntry> 
104            <#if (curEntry_index >= firstItemShowing) && (curEntry_index <= lastItemShowing)> 
105                <#assign assetRenderer = curEntry.getAssetRenderer()> 
106 
107                <@liferay_asset["asset-display"] 
108                    assetEntry=curEntry 
109                    assetRenderer=assetRenderer 
110                    showExtraInfo=false 
111                /> 
112            </#if> 
113        </#list> 
114    </div> 
115 
116    <div class="psshp_page-buttons"> 
117        <#if currentPage != 1> 
118            <a class="psshp_previous-button psshpLightBlueButton" href="${previousPage}"> 
119                Edellinen 
120            </a> 
121        </#if> 
122 
123        <#if currentPage * itemsShowing < entries?filter(categoryFilter)?size> 
124            <a class="psshp_next-button psshpLightBlueButton" href="${nextPage}"> 
125                Seuraava 
126            </a> 
127        </#if> 
128    </div> 
129</#if>