For "." left-hand operand: Expected a hash, but this has evaluated to a string (wrapper: f.t.SimpleScalar): ==> getSingleNode("title", element.root) [in template "400373534#400373580#594931221" at line 152, column 39] ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign title = getSingleNode("title"... [in template "400373534#400373580#594931221" at line 152, column 13] ----
1<#--
2 Widget Template
3 Type: Asset Publisher Template
4 Name: [pt] Lista de sites
5 [en] List of sites
6
7 Template ID (PROD): 594931221
8 Template Key: 289346221
9-->
10
11<#assign prefix = "kol" />
12
13<#assign sitesKlabin = "" />
14<#assign appsKlabin = "" />
15<#assign socialKlabin = "" />
16
17<#assign sitesKlabinCount = 0/>
18<#assign socialKlabinCount = 0 />
19
20<#function isExternal url>
21 <#return !url?contains(themeDisplay.getPortalURL()) && ( url?starts_with("http://") || url?starts_with("https://") ) />
22</#function>
23
24<#function isUrl url>
25 <#return url?has_content />
26</#function>
27
28<#function getRootElement curEntry>
29 <#assign assetRenderer = curEntry.getAssetRenderer() />
30 <#assign article = assetRenderer.getArticle() />
31 <#assign document = saxReaderUtil.read(article.getContent()) />
32 <#return { "root": document.getRootElement(), "article": article } />
33</#function>
34
35<#function getSingleNode name root>
36 <#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='${name}']/dynamic-content[@language-id='${locale}']") />
37 <#if !xPathSelector??>
38 <#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='${name}']") />
39 </#if>
40 <#if xPathSelector.selectSingleNode(root)?? >
41 <#return xPathSelector.selectSingleNode( root ) />
42 <#else>
43 <#return "" />
44 </#if>
45</#function>
46
47<#function getNodes name root>
48 <#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='${name}']") />
49 <#return xPathSelector.selectNodes( root ) />
50</#function>
51
52<style>
53 .${prefix}-mobile-nav-sites-klabin__icon-app {
54 padding: 0 !important;
55 }
56 .${prefix}-mobile-nav-sites-klabin__container {
57 display: flex;
58 flex: 1;
59 flex-direction: column;
60 background: #eeeae1;
61 }
62 .${prefix}-mobile-nav-sites-klabin__container-title {
63 display: flex;
64 width: 100%;
65 height: 28px;
66 flex-direction: row;
67 background: #eeeae1;
68 align-items: center;
69 justify-content: flex-start;
70 padding: 0 0 0 35px;
71 }
72 .${prefix}-mobile-nav-sites-klabin__title {
73 font-family: Raleway;
74 font-style: normal;
75 font-weight: 800;
76 font-size: 12px;
77 line-height: 14px;
78 text-transform: uppercase;
79 font-feature-settings: "pnum" on, "lnum" on;
80 color: #8b9f37;
81 margin: 0;
82 }
83 .${prefix}-mobile-nav-sites-klabin__container-item {
84 width: 100%;
85 height: 70px;
86 display: flex;
87 flex-direction: row;
88 align-items: center;
89 justify-content: space-between;
90 background: #f5f2e9;
91 border-bottom: 1px solid #d9d3c8;
92 }
93 .${prefix}-mobile-nav-sites-klabin__container-item-title {
94 display: flex;
95 flex-direction: row;
96 align-items: center;
97 justify-content: flex-start;
98 }
99 .${prefix}-mobile-nav-sites-klabin__item-title {
100 font-family: Raleway;
101 font-style: normal;
102 font-weight: 600;
103 font-size: 16px;
104 line-height: 14px;
105 font-feature-settings: "pnum" on, "lnum" on;
106 color: #3d4b14 !important;
107 margin: 0;
108 }
109 .${prefix}-mobile-nav-sites-klabin__container-icons {
110 display: flex;
111 flex-direction: row;
112 }
113 .${prefix}-mobile-nav-sites-klabin__icon-app {
114 display: flex;
115 align-items: center;
116 justify-content: center;
117 padding: 0 !important;
118 }
119 .${prefix}-mobile-nav-sites-klabin__action-bottom {
120 width: 100%;
121 height: 36px;
122 display: flex;
123 align-items: center;
124 justify-content: center;
125 background: #eeeae1;
126 margin: 12px 0 0 0;
127 font-family: Raleway;
128 font-style: normal;
129 font-weight: 800 !important;
130 font-size: 12px;
131 line-height: 14px;
132 text-align: center;
133 text-transform: uppercase !important;
134 font-feature-settings: "pnum" on, "lnum" on;
135 color: #009039 !important;
136 }
137 .${prefix}-mobile-nav-sites-klabin__action-bottom:after {
138 display: none;
139 }
140 a.${prefix}-mobile-nav-sites-klabin__icon-app {
141 padding-left: 10px!important;
142 }
143</style>
144
145<#if entries?has_content>
146 <div class="${prefix}-mobile-nav-sites-klabin__container">
147 <div class="${prefix}-mobile-nav-sites-klabin__container-title">
148 <h6 class="${prefix}-mobile-nav-sites-klabin__title">${languageUtil.get(request, "sites e apps klabin")}</h6>
149 </div>
150 <#list entries as entry>
151 <#assign element = getRootElement(entry) />
152 <#assign title = getSingleNode("title", element.root).getStringValue()?trim />
153 <#assign category = getSingleNode("category", element.root).getStringValue()?trim />
154 <#assign siteLink = getSingleNode("siteLink", element.root).getStringValue()?trim />
155 <#assign androidLink = getSingleNode("androidLink", element.root).getStringValue()?trim />
156 <#assign iOSLink = getSingleNode("iOSLink", element.root).getStringValue()?trim />
157 <#assign highlightLink = getSingleNode("highlightLink", element.root).getStringValue()?trim />
158
159 <#if (category?lower_case == "sites" || category?lower_case == "apps") && highlightLink == "true" && sitesKlabinCount < 6>
160 <#assign sitesKlabinCount += 1>
161 <#assign sitesKlabin>
162 ${sitesKlabin}
163 <#if category?lower_case == "sites">
164 <a class="${prefix}-mobile-nav-sites-klabin__container-item" ${isExternal(siteLink)?string('target="_blank"', '')} ${isUrl(siteLink)?string('href="${siteLink}"', '')} target="_blank" ${isUrl(siteLink)?string('style="cursor: pointer;"', 'style="cursor: default;"')}>
165 <p class="${prefix}-mobile-nav-sites-klabin__item-title">${title}</p>
166 <!-- <svg width="11" height="21" viewBox="0 0 11 21" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M1 19.5L10 10.5L0.999999 1.5" stroke="#3D4B14" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"/> </svg> -->
167 </a>
168 <#elseif category?lower_case == "apps">
169 <div class="${prefix}-mobile-nav-sites-klabin__container-item">
170 <div class="${prefix}-mobile-nav-sites-klabin__container-item-title">
171 <a ${isUrl(siteLink)?string('href="${siteLink}"', '')} ${isExternal(siteLink)?string('target="_blank"', '')} class="${prefix}-mobile-nav-sites-klabin__item-title" ${isUrl(siteLink)?string('style="cursor: pointer;"', 'style="cursor: default;"')}>${title}</a>
172 <div class="${prefix}-mobile-nav-sites-klabin__container-icons">
173 <#if iOSLink?has_content>
174 <a class="${prefix}-mobile-nav-sites-klabin__icon-app" ${isUrl(iOSLink)?string('href="${iOSLink}"', '')} target="_blank">
175 <svg width="14" height="18" viewBox="0 0 11 14" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M8.12235 0C6.65345 0.500204 5.50872 1.00041 5.67194 3.16796C7.14083 2.83449 8.44878 2.00082 8.12235 0ZM3.45723 3.00957C2.04296 3.00957 0.000123978 4.27675 0.000123978 6.65272C0.000123978 9.97909 2.2001 13.3054 3.45723 13.3054C4.40007 13.3054 5.18578 12.6719 5.81434 12.6719C6.44291 12.6719 7.07147 13.3054 8.01432 13.3054C9.27145 13.3054 10.6857 11.4047 11 9.66229C9.90001 8.8703 9.11431 8.39511 9.11431 6.96952C9.11431 6.01913 9.90001 5.06875 10.8429 4.27675C10.3714 3.64316 9.42859 3.00957 8.48574 3.00957C7.5429 3.00957 6.52901 3.7615 5.81434 3.80156C5.18578 3.80156 4.40007 3.00957 3.45723 3.00957Z" fill="#8B9F37"/> </svg>
176 </a>
177 </#if>
178 <#if androidLink?has_content>
179 <a class="${prefix}-mobile-nav-sites-klabin__icon-app" ${isUrl(androidLink)?string('href="${androidLink}"', '')} target="_blank">
180 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="body_1" width="14" height="14"> <g transform="matrix(0.8235294 0 0 0.8235294 0 0)"> <g transform="matrix(0.7083334 0 0 0.7083334 0 0)"> </g> <path transform="matrix(0.7083334 0 0 0.7083334 0 0)" d="M1.571 23.664L12.102 13.163L15.814 16.864L3.295 23.805C 2.819 24.069 2.236 24.065 1.763 23.794L1.763 23.794L1.571 23.664zM11.04 12.104L1 22.115L1 2.092999L11.04 12.104zM17.314 7.966999L22.219 10.686C 22.701 10.954 23 11.456 23 12C 23 12.544 22.701 13.046 22.219 13.314L22.219 13.314L17.18 16.107L13.165 12.104L17.314 7.966998zM1.459999 0.4329991C 1.549999 0.3459991 1.650999 0.2699991 1.762999 0.2059991C 2.235999 -0.06500086 2.818999 -0.06900087 3.294999 0.1949991L3.294999 0.1949991L15.948 7.209999L12.102 11.045L1.459999 0.4329987z" stroke="none" fill="#8B9F37" fill-rule="nonzero" /> </g> </svg>
181 </a>
182 </#if>
183 </div>
184 </div>
185 <!-- <a ${isUrl(siteLink)?string('href="${siteLink}"', '')}>
186 <svg width="11" height="21" viewBox="0 0 11 21" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M1 19.5L10 10.5L0.999999 1.5" stroke="#3D4B14" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"/> </svg>
187 </a> -->
188 </div>
189 </#if>
190 </#assign>
191 <#elseif category?lower_case == "socialmedia" && highlightLink == "true" && sitesKlabinCount < 6>
192 <#assign socialKlabinCount += 1>
193 <#assign socialKlabin>
194 ${socialKlabin}
195 <a class="${prefix}-mobile-nav-sites-klabin__container-item" ${isExternal(siteLink)?string('target="_blank"', '')} ${isUrl(siteLink)?string('href="${siteLink}"', '')} target="_blank" ${isUrl(siteLink)?string('style="cursor: pointer;"', 'style="cursor: default;"')}>
196 <p class="${prefix}-mobile-nav-sites-klabin__item-title">${title}</p>
197 <!-- <svg width="11" height="21" viewBox="0 0 11 21" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M1 19.5L10 10.5L0.999999 1.5" stroke="#3D4B14" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"/> </svg> -->
198 </a>
199 </#assign>
200 </#if>
201 </#list>
202 ${sitesKlabin}
203 <div class="${prefix}-mobile-nav-sites-klabin__container-title">
204 <h6 class="${prefix}-mobile-nav-sites-klabin__title">${languageUtil.get(request, "redes sociais klabin")}</h6>
205 </div>
206 ${socialKlabin}
207 <a href="/sites-klabin" class="${prefix}-mobile-nav-sites-klabin__action-bottom">${languageUtil.get(request, "sites-klabin-see-all-list")}</a>
208 </div>
209</#if>
Horário: 13h às 16h