Búsqueda de Trámites
An error occurred while processing the template.
The following has evaluated to null or missing:
==> structure [in template "36513#36563#42096" at line 48, column 38]
----
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: #if structure.getName(locale) == "Trá... [in template "36513#36563#42096" at line 48, column 33]
----
1<#assign journalarticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")/>
2<#assign structureLocalService = serviceLocator.findService("com.liferay.dynamic.data.mapping.service.DDMStructureLocalService")/>
3<#assign classNameLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.ClassNameLocalService")/>
4<#assign layoutLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.LayoutLocalService")/>
5
6<div class="search-total-label">
7 ${languageUtil.format(locale, "x-results-for-x", [searchContainer.getTotal(), "<strong>" + htmlUtil.escape(searchResultsPortletDisplayContext.getKeywords()) + "</strong>"], false)}
8</div>
9
10<div class="display-list">
11 <ul class="list-group" id="search-results-display-list">
12 <#if entries?has_content>
13 <#list entries as entry>
14
15 <#if entry.getModelResource() == "Artículo de contenido web">
16 <#assign journal = journalarticleLocalService.getLatestArticle(entry.getClassPK())/>
17 <#assign classname = classNameLocalService.getClassName(entry.getClassName())/>
18 <#assign document = saxReaderUtil.read(journal.getContentByLocale(locale)) >
19 <#assign rootElement = document.getRootElement() >
20 <#list rootElement.elements() as dynamicElement >
21 <#if "CampoDeTexto38700073" == dynamicElement.attributeValue("name") >
22 <#assign URLTramite = dynamicElement.element("dynamic-content") >
23 </#if>
24 </#list>
25 <#attempt>
26 <#assign structure = structureLocalService.getStructure(journal.getGroupId(), classname.getClassNameId(), journal.getStructureId(), false)/>
27 <#assign tipo_contenido = entry.getModelResource() + " - " + structure.getName(locale)/>
28 <#assign fecha_modificacion = "Modificado el " + journal.getModifiedDate()?date/>
29 <#recover>
30 <#assign tipo_contenido = entry.getModelResource()/>
31 <#assign fecha_modificacion = "Modificado el " + journal.getModifiedDate()?date/>
32 </#attempt>
33 <#elseif entry.getModelResource() == "Página">
34 <#assign tipo_contenido = entry.getModelResource()/>
35 <#assign classname = classNameLocalService.getClassName(entry.getClassName())/>
36 <#assign pagelayout = layoutLocalService.fetchLayout(classname.getClassNameId(),entry.getClassPK())/>
37 <#assign fecha_modificacion = "Modificado el " + pagelayout.getModifiedDate()?date/>
38 <#else>
39 <#assign tipo_contenido = entry.getModelResource()/>
40 <#assign fecha_modificacion = "Creado el " + entry.getCreationDateString()/>
41 </#if>
42 <li class="list-group-item list-group-item-flex mb-0">
43 <#if !entry.isTemporarilyUnavailable()>
44
45 <div class="autofit-col autofit-col-expand">
46 <section class="autofit-section">
47 <div class="list-group-title">
48 <#if structure.getName(locale) == "Trámite" && URLTramite?? && ((URLTramite.getData()?has_content) && (URLTramite.getData()?length>1))>
49 <a href="${URLTramite.getData()}" target="_blank">
50 ${entry.getHighlightedTitle()}
51 </a>
52 <#else>
53 <a href="/w/${journal.getUrlTitle()}">
54 ${entry.getHighlightedTitle()}
55 </a>
56 </#if>
57 </div>
58
59 <div class="search-results-metadata">
60 <p class="list-group-subtext">
61 <#if entry.isModelResourceVisible()>
62 <!-- TIPO CONTENIDO -->
63 <span class="subtext-item">
64 <strong>${tipo_contenido}</strong>
65 </span>
66 </#if>
67
68 <#if entry.isLocaleReminderVisible()>
69 <@liferay_ui["icon"]
70 icon="../language/${entry.getLocaleLanguageId()}"
71 message=entry.getLocaleReminder()
72 />
73 </#if>
74
75 <!-- FECHA DE CREACIÓN -->
76 <#if entry.isCreationDateVisible()>
77 <span class="subtext-item">
78 ${fecha_modificacion}
79 </span>
80 </#if>
81 </p>
82
83 <!-- CONTENIDO -->
84 <#if entry.isContentVisible()>
85 <p class="list-group-subtext">
86 <span class="subtext-item">
87 ${entry.getContent()}
88 </span>
89 </p>
90 </#if>
91
92 <#if entry.isFieldsVisible()>
93 <p class="list-group-subtext">
94 <#assign separate = false />
95
96 <#list entry.getFieldDisplayContexts() as fieldDisplayContext>
97 <#if separate>
98 ·
99 </#if>
100
101 <span class="badge">${fieldDisplayContext.getName()}</span>
102
103 <span>${fieldDisplayContext.getValuesToString()}</span>
104
105 <#assign separate = true />
106 </#list>
107 </p>
108 </#if>
109
110 <!-- CATEGORÍA -->
111 <#if entry.isAssetCategoriesOrTagsVisible()>
112 <div class="h6 search-document-tags text-default">
113 <@liferay_asset["asset-tags-summary"]
114 className=entry.getClassName()
115 classPK=entry.getClassPK()
116 paramName=entry.getFieldAssetTagNames()
117 portletURL=entry.getPortletURL()
118 />
119
120 <@liferay_asset["asset-categories-summary"]
121 className=entry.getClassName()
122 classPK=entry.getClassPK()
123 paramName=entry.getFieldAssetCategoryIds()
124 portletURL=entry.getPortletURL()
125 />
126 </div>
127 </#if>
128
129 <#if entry.isDocumentFormVisible()>
130 <div class="expand-details h6 text-default">
131 <span class="list-group-text" style="">
132 <a href="javascript:;">
133 <@liferay.language key="details" />...
134 </a>
135 </span>
136 </div>
137
138 <div class="hide search-results-list table-details table-responsive">
139 <table class="table">
140 <thead>
141 <tr>
142 <th class="key-column">
143 <@liferay.language key="key" />
144 </th>
145 <th>
146 <@liferay.language key="value" />
147 </th>
148 </tr>
149 </thead>
150
151 <tbody>
152 <#list entry.getDocumentFormFieldDisplayContexts() as fieldDisplayContext>
153 <tr>
154 <td class="key-column table-details-content">
155 <strong>${htmlUtil.escape(fieldDisplayContext.getName())}</strong>
156 </td>
157 <td class="table-details-content">
158 <code>
159 ${fieldDisplayContext.getValuesToString()}
160 </code>
161 </td>
162 </tr>
163 </#list>
164 </tbody>
165 </table>
166 </div>
167 </#if>
168 </div>
169 </section>
170 </div>
171 <#else>
172 <div class="autofit-col">
173 <div class="alert alert-danger">
174 <@liferay.language_format
175 arguments="result"
176 key="is-temporarily-unavailable"
177 />
178 </div>
179 </div>
180 </#if>
181 </li>
182 </#list>
183 </#if>
184 </ul>
185</div>
186
187<@liferay_aui.script use="aui-base">
188 A.one('#search-results-display-list').delegate(
189 'click',
190 function(event) {
191 var currentTarget = event.currentTarget;
192
193 currentTarget.siblings('.search-results-list').toggleClass('hide');
194 },
195 '.expand-details'
196 );
197</@liferay_aui.script>