Contact

Sacyr S.A.
C/ Condesa de Venadito, 7
28027 Madrid España
The following has evaluated to null or missing: ==> imagenJson.groupId [in template "42020#42061#120273524" at line 23, column 86] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to 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: #assign urlImagen = "/documents/" + i... [in template "42020#42061#120273524" at line 23, column 49] ----
1<#assign layoutLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.LayoutLocalService")>
2<h3 class="title"><@liferay.language key="sacyr-search-office-list" /></h3>
3<#if entries?has_content>
4 <section class="row pB100 flexbox wm300">
5 <#list entries as curEntry>
6 <#assign article=curEntry.getAssetRenderer().getArticle() />
7 <#assign articleId=curEntry.getAssetRenderer().getArticle().getArticleId()?number />
8 <#assign docXml=saxReaderUtil.read(curEntry.getAssetRenderer().getArticle().getContentByLocale(locale)) />
9 <#assign viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, curEntry, true) />
10 <#if docXml??>
11 <#assign title=docXml.valueOf( "//dynamic-element[@name='title']/dynamic-content/text()") />
12 <#assign address=docXml.valueOf( "//dynamic-element[@name='address']/dynamic-content/text()") />
13 <#assign postalCode=docXml.valueOf( "//dynamic-element[@name='postalCode']/dynamic-content/text()") />
14 <#assign town=docXml.valueOf( "//dynamic-element[@name='town']/dynamic-content/text()") />
15 <#assign country=docXml.valueOf( "//dynamic-element[@name='country']/dynamic-content/text()") />
16 <#assign telephone=docXml.valueOf( "//dynamic-element[@name='telephone']/dynamic-content/text()") />
17 <#assign fax=docXml.valueOf( "//dynamic-element[@name='fax']/dynamic-content/text()") />
18 <#assign linkToPage=docXml.valueOf( "//dynamic-element[@name='linkToPage']/dynamic-content/text()") />
19 <#assign linkToPageContact=docXml.valueOf( "//dynamic-element[@name='linkToPageContact']/dynamic-content/text()") />
20 <#assign imageCountry=docXml.valueOf( "//dynamic-element[@name='countryImage']/dynamic-content/text()") />
21 <#if isJson(imageCountry)>
22 <#assign imagenJson = jsonFactoryUtil.createJSONObject(imageCountry)>
23 <#assign urlImagen = "/documents/" + imagenJson.groupId + "/" + imagenJson.uuid >
24 </#if>
25 <#assign visible=docXml.valueOf( "//dynamic-element[@name='visible']/dynamic-content/text()") />
26 <#if visible?has_content >
27 <#assign linkToPageFriendly = "">
28 <#assign linkToPageContactFriendly = "">
29 <#if linkToPage?has_content >
30 <#list linkToPage?split("@") as item>
31 <#if isJson(item)>
32 <#assign itemJson = jsonFactoryUtil.createJSONObject(item)>
33 </#if>
34 <#if itemJson.groupId?? && itemJson.privateLayout?? && itemJson.layoutId??>
35 <#assign linkGroupId = itemJson.groupId?number>
36 <#assign linkPrivate = itemJson.privateLayout>
37 <#assign linkPageId = itemJson.layoutId?number>
38 </#if>
39 </#list>
40 <#if linkPageId?? && linkPageId != 0>
41 <#attempt>
42 <#assign pageLayout = layoutLocalService.getLayout(linkGroupId, linkPrivate, linkPageId)>
43 <#assign linkToPageFriendly = pageLayout.getFriendlyURL()>
44 <#recover>
45 <#assign linkToPageFriendly = "">
46 </#attempt>
47 </#if>
48 </#if>
49 <#if linkToPageContact?has_content >
50 <#list linkToPageContact?split("@") as itemContact>
51 <#if isJson(itemContact)>
52 <#assign itemJson = jsonFactoryUtil.createJSONObject(itemContact)>
53 </#if>
54 <#if itemJson.groupId?? && itemJson.privateLayout?? && itemJson.layoutId??>
55 <#assign linkContactPageId = itemJson.layoutId?number>
56 <#assign linkContactPrivate = itemJson.privateLayout>
57 <#assign linkContactGroupId = itemJson.groupId?number>
58 </#if>
59 </#list>
60 <#if linkPageId?? && linkPageId != 0>
61 <#attempt>
62 <#assign pageContactLayout = layoutLocalService.getLayout(linkContactGroupId, linkContactPrivate, linkContactPageId)>
63 <#assign linkToPageContactFriendly = pageContactLayout.getFriendlyURL()>
64 <#recover>
65 <#assign linkToPageContactFriendly = "">
66 </#attempt>
67 </#if>
68 </#if>
69 <div class="flexColumna col-12 p-0 bgBlanco m10 cornerBR">
70 <div class="office-item cornerBR">
71 <div class="prelativa">
72 <#assign titleClass = "office-name text-left">
73 <#if urlImagen?has_content>
74 <img src="${urlImagen}" class="country-flag">
75 <#assign titleClass = "office-name with-img">
76 </#if>
77 <h5 class="${titleClass}">
78 <#if linkToPageFriendly?has_content>
79 <a href="${linkToPageFriendly?remove_beginning("/")}">
80 <#else>
81 <a href="#">
82 </#if>
83 ${article.getTitle(locale)}
84 </a>
85 </h5>
86 </div>
87 <#if address?has_content || postalCode?has_content || town?has_content || country?has_content>
88 <div class="office-location">
89 <#if address?has_content>
90 <p class="street">${address}</p>
91 </#if>
92 <#if postalCode?has_content || town?has_content || country?has_content>
93 <p class="city">
94 <#if postalCode?has_content>
95 ${postalCode}
96 </#if>
97 <#if town?has_content>
98 ${town}
99 </#if>
100 <#if country?has_content>
101 ${country}
102 </#if>
103 </p>
104 </#if>
105 </div>
106 </#if>
107 <#if telephone?has_content>
108 <div class="office-phone"><a href="tel:${telephone}">${telephone}</a></div>
109 </#if>
110 <#if fax?has_content>
111 <div class="office-fax"><small><@liferay.language key="sacyr-fax" /></small>${fax}</div>
112 </#if>
113 <div class="view-more mL30">
114 <#if linkToPageContactFriendly?has_content>
115 <a href="${linkToPageContactFriendly?remove_beginning("/")}"><@liferay.language key="contact" /> <i class="fa fa-angle-right"></i></a>
116 <#else>
117 <a href="#"><@liferay.language key="contact" /> <i class="fa fa-angle-right"></i></a>
118 </#if>
119 </div>
120 </div>
121 </div>
122 </#if>
123 </#if>
124 </#list>
125 </section>
126</#if>
127
128<#function isJson json>
129 <#local value = json?trim>
130 <#return value?has_content && value?starts_with("{") && value?ends_with("}")>
131</#function>