An error occurred while processing the template.
Can't convert this string to number: "40&eventCatID"
The blamed expression:
==> selectedCategoriesId?number [in template "20096#20121#5285305" at line 21, column 63]
----
FTL stack trace ("~" means nesting-related):
- Failed at: eventCatID = selectedCategoriesId?number [in template "20096#20121#5285305" at line 21, column 52]
----
1<#assign AssetCategoryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService")>
2<#assign requestedUrl = themeDisplay.getURLCurrent() />
3<#assign params=requestedUrl?split('?')
4 selectedCategoriesId=""/>
5<#list params as p>
6<#if p?contains("eventCatID")>
7<#assign id=p?split('=')/>
8<#assign selectedCategoriesId=id[1] />
9</#if>
10</#list>
11
12
13<section class="c-simple-header">
14 <div class="container">
15 <div class="c-simple-header__block ${imageAlignmentForMobile.getData()}" style="background-color: #1e1836;">
16 <#if (heading.getData())?has_content>
17 <div class="c-simple-header__body">
18 <h1 class="c-section__title mb-0">
19 <#if selectedCategoriesId?has_content>
20 <#assign eventCatID=selectedCategoriesId?number
21 category=AssetCategoryLocalService.getAssetCategory(eventCatID)/>
22
23 ${category.getName()} ${heading.getData()}
24
25 <#else>
26 ${heading.getData()}
27 </#if>
28 </h1>
29 </div>
30 </#if>
31 </div>
32 </div>
33</section>
34
35<style>
36@media (max-width: 575.98px) {
37 .c-simple-header__block.c-left-top {
38 background-position: left top;
39 }
40 .c-simple-header__block.c-center-top {
41 background-position: center top;
42 }
43 .c-simple-header__block.c-right-top {
44 background-position: right top;
45 }
46
47 .c-simple-header__block.c-left-center {
48 background-position: left center;
49 }
50 .c-simple-header__block.c-center-center {
51 background-position: center center;
52 }
53 .c-simple-header__block.c-right-center {
54 background-position: right center;
55 }
56
57 .c-simple-header__block.c-left-bottom {
58 background-position: left bottom;
59 }
60 .c-simple-header__block.c-center-bottom {
61 background-position: center bottom;
62 }
63 .c-simple-header__block.c-right-bottom {
64 background-position: right bottom;
65 }
66}
67</style>
68
69<script>
70$(document).ready(function(){
71 $(".c-simple-header__block").css("background-image", "url('${Image.getData()}')");
72});
73</script>