Standorte
 
Vielen Dank für's Teilen!
Fehler bei der Verarbeitung der Vorlage.
The following has evaluated to null or missing:
==> geoLoc_customgeolocation  [in template "20116#20152#LOCATION-ELEMENT-DETAIL" at line 84, column 6]

----
Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #if geoLoc_customgeolocation.getData(...  [in template "20116#20152#LOCATION-ELEMENT-DETAIL" at line 84, column 1]
----
1<style> 
2    #map-detail .search-controls { 
3        display: none; 
4
5 
6    #map-detail .lfr-map{ 
7    height: 540px; 
8
9 
10    .b-map-detail__address{ 
11    font-size: 24px; 
12    line-height: 1.5; 
13    letter-spacing: 0.5px; 
14    padding: 20px 0; 
15
16 
17    .b-map-detail__title{ 
18    font-size: 40px; 
19    padding: 20px 0; 
20
21 
22    .b-map-detail__info{ 
23    padding: 20px 0; 
24    font-size: 16px; 
25    line-height: 1.5; 
26
27 
28    .b-map-detail__social{ 
29    padding: 20px 0; 
30
31 
32    .b-map-detail__social a{ 
33    padding: 5px; 
34    border: 1px solid black; 
35    border-radius: 5px; 
36    color: black; 
37
38 
39    .b-map-detail__social a:nth-child(even) { 
40    margin: 0 20px; 
41
42 
43 
44    .b-map-detail__list-services{ 
45    color: #34a6f8; 
46
47 
48    .b-map-detail__info .b-map-detail__summary p, 
49    .b-map-detail__info .b-map-detail__products p { 
50    font-size: 16px; 
51    line-height: 1.5; 
52    font-weight: normal; 
53
54 
55    .b-map-detail__info .file-download { 
56        position: relative; 
57        margin: 5px 0; 
58
59 
60    .b-map-detail__info .file-download a { 
61        display: inline-block; 
62        position: absolute; 
63
64 
65    .b-map-detail__info .file-download img { 
66        max-height: 35px; 
67        margin-right: 5px; 
68        margin-top: 5px; 
69
70 
71    .b-map-detail__attachments { 
72    margin-top: 10px; 
73
74 
75    .glyphicon { 
76        top: 2px; 
77
78 
79</style> 
80 
81<#assign geoLocLatitude = 0> 
82<#assign geoLocLongitude = 0> 
83 
84<#if geoLoc_customgeolocation.getData() != ""> 
85        <#assign geolocationJSONObject = jsonFactoryUtil.createJSONObject(geoLoc_customgeolocation.getData())> 
86        <#assign geoLocLatitude = geolocationJSONObject.getDouble("latitude")> 
87        <#assign geoLocLongitude = geolocationJSONObject.getDouble("longitude")> 
88</#if> 
89 
90<#assign serviceContext = staticUtil["com.liferay.portal.kernel.service.ServiceContextThreadLocal"].getServiceContext() /> 
91<#assign themeDisplay = serviceContext.getThemeDisplay() /> 
92 
93<#assign alternateImageLogo = "/documents/46167902/46169681/cemex-logo.svg/418cc77d-71b2-52cd-a77e-61e175b04645?t=1528834591975" /> 
94<#assign googleApiKey = "AIzaSyBpU2wvZLdWOckkzbMoBqGm63wen3-ip1c" /> 
95 
96<script type="application/ld+json"> 
97
98        "@context": "http://schema.org", 
99        "@type": "LocalBusiness", 
100                "address": { 
101                    "@type": "PostalAddress", 
102                    "streetAddress": "${locationAddress.street.getData()}", 
103                    "addressLocality": "${locationAddress.city.getData()}", 
104                    "addressRegion": "${locationAddress.area.getData()}", 
105                    "postalCode": "${locationAddress.postcode.getData()}" 
106                }, 
107        "name": "${locationName.getData()}", 
108        "image": <#if image??  && image.getData() != "">"${image.getData()}"<#else>"${themeDisplay.getPortalURL()}${alternateImageLogo}"</#if>, 
109        "description": "", 
110        "telephone": <#if telephoneNumber.getData()!="" || workTelephoneNumber.getData()!="">[<#if telephoneNumber.getSiblings()?hasContent ><#list telephoneNumber.getSiblings() as phone><#if phone.getData()?? && phone.getData() != "">"${phone.getData()}"</#if><#sep>, </#sep></#list><#if workTelephoneNumber.getSiblings()?hasContent ><#if telephoneNumber.getData()!="" && workTelephoneNumber.getData()!="">,</#if><#list workTelephoneNumber.getSiblings() as workphone><#if workphone.getData()?? && workphone.getData() != "">"${workphone.getData()}"</#if><#sep>, </#sep></#list></#if></#if>]<#else>""</#if>, 
111        "faxNumber": "${fax.getData()}", 
112    "openingHours": "${openingHours.getData()}", 
113        "url": "${themeDisplay.getPortalURL() + themeDisplay.getURLCurrent()}", 
114        "geo": { 
115            "@type": "GeoCoordinates", 
116            "latitude": "${geoLocLatitude}", 
117            "longitude": "${geoLocLongitude}" 
118        }, 
119         
120        "hasmap": "https://maps.google.com/maps?saddr=berlin&daddr=${geoLocLatitude},${geoLocLongitude}" 
121
122</script> 
123 
124<div class="container"> 
125   
126  <div class="row b-map-detail__info"> 
127 
128    <div class="col-md-6"> 
129 
130      <h1 class="b-map-detail__title">${locationName.getData()}</h1> 
131 
132      <div class="b-map-detail__rating"> 
133        <#if GooglePlaceID?? && GooglePlaceID.getData() != ""> 
134 
135            ${printRating(GooglePlaceID.getData(), googleApiKey)} 
136 
137        </#if> 
138      </div> 
139       
140      <div class="b-map-detail__address"> 
141        <span> 
142          <h3>${locationAddress.street.getData()}, ${locationAddress.postcode.getData()} ${locationAddress.city.getData()}, ${locationAddress.area.getData()}</h3> 
143        </span> 
144      </div> 
145       
146      <div class="b-map-detail__opening-hours"> 
147      <#if openingHours?? && openingHours.getData() != ""> 
148        Öffnungszeiten: ${openingHours.getData()} 
149      </#if> 
150      </div> 
151 
152      <div class="b-map-detail__contact-person"> 
153      <#if contactPerson?? && contactPerson.getData() != "" > 
154        Ansprechpartner: ${contactPerson.getData()} 
155      </#if> 
156      </div> 
157       
158      <div class="b-map-detail__phones"> 
159        <p class="b-map-detail__phones"> 
160   
161          <#if telephoneNumber.getSiblings()?hasContent > 
162          <#list telephoneNumber.getSiblings() as phone> 
163          <#if phone?? && phone.getData() != ""> 
164          <#if phone?index &gt; 0 > 
165          <div class="b-map-detail__phone"> 
166            <span style = "padding-left: 3.8em;"> 
167              ${phone.getData()} 
168            </span> 
169          </div> 
170          <#else> 
171          <div class="b-map-detail__phone"> 
172            <span> 
173              Telefon: ${phone.getData()} 
174            </span> 
175          </div> 
176          </#if> 
177          </#if> 
178          </#list> 
179          </#if> 
180           
181          <#if workTelephoneNumber.getSiblings()?hasContent > 
182          <#list workTelephoneNumber.getSiblings() as phoneWork> 
183          <#if phoneWork?? && phoneWork.getData() != ""> 
184          <#if phoneWork?index &gt; 0 > 
185          <div class="b-map-detail__phone"> 
186            <span style = "padding-left: 6.4em;"> 
187              ${phoneWork.getData()} 
188            </span> 
189          </div> 
190          <#else> 
191          <div class="b-map-detail__phone"> 
192            <span> 
193              Werkstelefon: ${phoneWork.getData()} 
194            </span> 
195          </div> 
196          </#if> 
197          </#if> 
198          </#list> 
199          </#if> 
200           
201          <div class="b-map-detail__company"> 
202              
203              <span> 
204              Firma: ${firma.getData()} 
205              </span> 
206              </div> 
207         
208        </p> 
209         
210      </div> 
211       
212      <div class="b-map-detail__fax"> 
213      <#if fax?? && fax.getData() != ""> 
214        Fax: ${fax.getData()} 
215      </#if> 
216      </div> 
217       
218 
219      <#if attachment?? && attachment.getSiblings()?? && attachment.getSiblings()?hasContent> 
220        <div class="b-map-detail__attachments"> 
221          <#list attachment.getSiblings() as cur_attachment> 
222            <div class="row"> 
223              <#if isNotEmptyElement(cur_attachment.file)> 
224                <@generateAttachmentElement cur_attachment.file.getData() cur_attachment.title/> 
225              </#if> 
226            </div> 
227          </#list> 
228        </div> 
229      </#if> 
230 
231 
232    </div> 
233    <div class="col-md-6"> 
234      <#if image?? && image.getData()?? && image.getData() != ""> 
235        <img class="img-responsive" data-fileentryid="${image.getAttribute("fileEntryId")}" alt="${image.getAttribute("alt")}" src="${image.getData()}" /> 
236      <#else> 
237        <div id="map-detail"> 
238            <#if (geoLoc_customgeolocation.getData() != "")> 
239                <@liferay_map["map-display"] 
240                    geolocation=true 
241                    latitude=geoLocLatitude 
242                    longitude=geoLocLongitude 
243                    name="geoLoc_customgeolocation" 
244                /> 
245            </#if> 
246        </div> 
247      </#if> 
248    </div> 
249     
250 
251  </div> 
252   <#if image?? && image.getData()?? && image.getData() != ""> 
253  <div class="row"> 
254    <div class="col-md-12"> 
255      <div id="map-detail"></div> 
256    </div> 
257  </div> 
258  </#if> 
259</div> 
260 
261<#function isNotEmptyElement element> 
262  <#return element?? && element.getData()?? && element.getData()!=""> 
263</#function> 
264 
265<#macro generateAttachmentElement attachmentURL title> 
266    <#assign counter = 0 > 
267    <#list attachmentURL?split("/") as chunkURL> 
268        <#if counter == 2> 
269            <#assign groupId = chunkURL?number > 
270        </#if> 
271        <#if counter == 5> 
272            <#if chunkURL?indexOf("?") != -1> 
273                <#assign uuId = chunkURL?substring(0, chunkURL?indexOf("?")) > 
274            <#else> 
275                <#assign uuId = chunkURL > 
276            </#if> 
277        </#if> 
278        <#assign counter = counter+1 > 
279    </#list> 
280 
281    <#assign fileEntry = serviceLocator.findService('com.liferay.document.library.kernel.service.DLFileEntryService') />  
282    <#assign file=fileEntry.getFileEntryByUuidAndGroupId(uuId, getterUtil.getLong(groupId)) > 
283    <#assign fileName = file.getTitle()> 
284    <#assign fileDescription = file.getDescription()> 
285 
286        <div class="col-xs-12 col-md-5 file-detail"> 
287            <div class="file-description">${fileDescription}</div> 
288            <div class="file-download"><img src="/documents/46167902/46169687/pdf-icon.png/aff2ac7d-c8ed-eaf1-19fe-28e4df36ee69?t=1523381391249" alt="${fileDescription}"><a href="${attachmentURL}" target="_blank"> 
289              <#if isNotEmptyElement(title)> 
290                    ${title.getData()} 
291                <#else> 
292                  ${fileName} 
293                </#if> 
294            </a></div> 
295        </div> 
296        <div class="col-xs-1"></div> 
297</#macro> 
298 
299 
300 
301<#function printRating glid gapi> 
302    <#assign response = httpUtil.URLtoString("https://maps.googleapis.com/maps/api/place/details/json?placeid="+glid+"&fields=name,rating,user_ratings_total,url&key="+gapi) > 
303    <#assign resp = response?eval> 
304    <#assign return = ""> 
305    <#if resp.result??> 
306        <#if !resp.result.rating??> 
307            <#assign rate = 0> 
308            <#assign user_rates = 0> 
309        <#else> 
310            <#assign rate = resp.result.rating> 
311            <#assign user_rates = resp.result.user_ratings_total> 
312        </#if> 
313        <#assign return = return + rate + " " + countStars(rate)> 
314        <#assign return = return + ' | <a href="' + resp.result.url + '" target="_blank">' + user_rates + ' Bewertungen</a>'> 
315        <#-- control print of the place name, api key and place id 
316        <#assign return = return + "Name: " + resp.result.name > 
317        <#assign return = return + "<BR>GLID: "+glid+"<BR> GAPI: "+gapi+"BR"> 
318        --> 
319    <#else> 
320        <#assign return = return + resp.status + "<br>"> 
321        <#if resp.error_message??> 
322            <#assign return = return + resp.error_message> 
323        </#if> 
324    </#if> 
325    <#return return> 
326</#function> 
327 
328<#-- wwrite stars based on number --> 
329<#function countStars stars> 
330    <#assign return = ""> 
331    <#list 1..5 as x> 
332        <#if (x > stars)> 
333            <#assign return = return + '<i class="glyphicon glyphicon-star-empty"></i>'> 
334        <#else> 
335            <#assign return = return + '<i class="glyphicon glyphicon-star"></i>'> 
336        </#if> 
337    </#list> 
338    <#return return> 
339</#function> 

Kontaktieren Sie uns

 

Sie haben Fragen zu unseren Produkten oder eine Rückmeldung anderer Art? Dann schreiben Sie uns oder rufen Sie uns an!  

Kontakt                       Standorte