حصل خطأ عند معالجة القالب.
The following has evaluated to null or missing: ==> SectionVideoJson4.fileEntryId [in template "20097#20123#49846" at line 215, column 55] ---- 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: fileEntryId = SectionVideoJson4.fileE... [in template "20097#20123#49846" at line 215, column 41] ----
1<#--
2Widget templates can be used to modify the look of a
3specific application.
4
5Please use the left panel to quickly add commonly used variables.
6Autocomplete is also available and can be invoked by typing "${".
7-->
8<style>
9 .taglib-page-iterator .lfr-pagination-config {
10 display:none;
11 }
12 .taglib-page-iterator .search-results, .taglib-page-iterator .lfr-pagination-buttons {
13 float:none !important;
14 }
15 .pagination>li>a {
16 padding-left: 20px;
17 width: auto !important;
18 }
19 .lfr-pagination {
20 text-align: center;
21 }
22</style>
23
24<#assign dlAppLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLAppLocalService") />
25<#assign dlUtil = staticUtil["com.liferay.document.library.kernel.util.DLUtil" ]/>
26<#assign
27 filter = request.getParameter('filter')!''
28 view = request.getParameter('view')!'list'
29
30 filterdatechangetype="date_asc"
31 filtertitlechangetype="title_asc"
32 filterfield = "modifiedDate"
33 filtersort = "?reverse"
34>
35<#if view=="" >
36 <#assign view="list" >
37</#if>
38<#if filter=="date_desc" >
39 <#assign filtertype="date"
40 filterdatechangetype="date_asc"
41 sort_arrow_up_opacity = "0.5"
42 sort_arrow_down_opacity = "1"
43 filterfield = "modifiedDate"
44 filtersort = "?reverse"
45 >
46<#elseif filter=="date_asc" >
47 <#assign filtertype="date"
48 filterdatechangetype="date_desc"
49 sort_arrow_up_opacity = "1"
50 sort_arrow_down_opacity = "0.5"
51 filterfield = "modifiedDate"
52 filtersort = ""
53 >
54<#elseif filter=="title_desc" >
55 <#assign filtertype="title"
56 filtertitlechangetype="title_asc"
57 sort_arrow_up_opacity = "0.5"
58 sort_arrow_down_opacity = "1"
59 filterfield = "title"
60 filtersort = "?reverse"
61 >
62<#elseif filter=="title_asc" >
63 <#assign filtertype="title"
64 filtertitlechangetype="title_desc"
65 sort_arrow_up_opacity = "1"
66 sort_arrow_down_opacity = "0.5"
67 filterfield = "title"
68 filtersort = ""
69 >
70<#else>
71 <#assign filtertype="date"
72 filterdatechangetype="date_asc"
73 filtertitlechangetype="title_asc"
74 sort_arrow_up_opacity = "0.5"
75 sort_arrow_down_opacity = "1"
76 filterfield = "modifiedDate"
77 filtersort = "?reverse"
78 >
79</#if>
80
81
82<!-- Creating a freemarker function in which will be used to get JournalArticle Custom Fieldby name -->
83<#function getFieldValue Fields fieldName>
84<#list Fields as Field>
85<#if Field.name == fieldName>
86<#assign value=Field.getValue().getString(locale) />
87<#return value />
88</#if>
89</#list>
90<#return null />
91</#function>
92
93<div class="contents pages">
94 <section class="breadcrumb_wrapper">
95 <div class="container">
96 <div class="row">
97 <div class="col-12 fadeInUp wow" data-wow-delay="0.3s">
98 <!--<@liferay_ui["message"] key="pai-video-library" />
99 <#if locale?contains("ar")>
100 <h1>مكتبة الفيديو</h1>
101 <#else>
102 <h1>Video Library</h1>
103 </#if>-->
104
105 </div>
106 </div>
107 </div>
108 </section>
109
110 <section class="pt-3">
111 <div class="container">
112
113 <div class="row">
114 <div class="filter_block fadeInUp wow" data-wow-delay="0.3s">
115 <div class="sort">
116 <div class="sort_text">
117 <@liferay_ui["message"] key="pai-filter-by" /><!--Filter by-->
118 </div>
119 <div class="sort_buttons">
120 <button type="button" class="<#if filtertype=='date'>active</#if>" onclick="changefilter('${filterdatechangetype}','${view}')">Date
121 <svg class="sortArrows" width="18" height="16" viewBox="0 0 18 16" fill="none"
122 xmlns="http://www.w3.org/2000/svg">
123 <g clip-path="url(#clip0_1128_8384)" class="sort_arrow_up">
124 <path
125 d="M17.6909 4.3335C17.4462 4.577 17.0505 4.57606 16.807 4.33141L14.625 2.13884V15.375C14.625 15.7202 14.3452 16 14 16C13.6548 16 13.375 15.7202 13.375 15.375V2.13881L11.193 4.33144C10.9495 4.57609 10.5538 4.57703 10.3091 4.33353C10.0644 4.09 10.0635 3.69428 10.307 3.44963L13.557 0.183875C13.5572 0.183657 13.5574 0.1835 13.5576 0.183312C13.8011 -0.0607185 14.1981 -0.0615005 14.4424 0.183281C14.4426 0.183499 14.4428 0.183656 14.443 0.183844L17.693 3.44959C17.9364 3.69422 17.9356 4.08997 17.6909 4.3335Z"
126 fill="white" fill-opacity="${sort_arrow_up_opacity}" />
127 </g>
128 <g clip-path="url(#clip1_1128_8384)" class="sort_arrow_down">
129 <path
130 d="M7.69087 11.6665C7.44622 11.423 7.0505 11.4239 6.807 11.6686L4.625 13.8612V0.625C4.625 0.279813 4.34519 0 4 0C3.65481 0 3.375 0.279813 3.375 0.625V13.8612L1.193 11.6686C0.949498 11.4239 0.553779 11.423 0.309123 11.6665C0.0644353 11.91 0.0635292 12.3057 0.306998 12.5504L3.557 15.8161C3.55719 15.8163 3.5574 15.8165 3.55759 15.8167C3.80109 16.0607 4.19809 16.0615 4.4424 15.8167C4.44259 15.8165 4.44281 15.8163 4.443 15.8162L7.693 12.5504C7.93643 12.3058 7.93559 11.91 7.69087 11.6665Z"
131 fill="white" fill-opacity="${sort_arrow_down_opacity}" />
132 </g>
133 <defs>
134 <clipPath id="clip0_1128_8384">
135 <rect width="8" height="16" fill="white"
136 transform="matrix(1 0 0 -1 10 16)" />
137 </clipPath>
138 <clipPath id="clip1_1128_8384">
139 <rect width="8" height="16" fill="white" />
140 </clipPath>
141 </defs>
142 </svg>
143 </button>
144 <button type="button" class="<#if filtertype=='title'>active</#if>" onclick="changefilter('${filtertitlechangetype}','${view}')">Name
145 <svg class="sortArrows" width="18" height="16" viewBox="0 0 18 16" fill="none"
146 xmlns="http://www.w3.org/2000/svg">
147 <g clip-path="url(#clip0_1128_8384)" class="sort_arrow_up">
148 <path
149 d="M17.6909 4.3335C17.4462 4.577 17.0505 4.57606 16.807 4.33141L14.625 2.13884V15.375C14.625 15.7202 14.3452 16 14 16C13.6548 16 13.375 15.7202 13.375 15.375V2.13881L11.193 4.33144C10.9495 4.57609 10.5538 4.57703 10.3091 4.33353C10.0644 4.09 10.0635 3.69428 10.307 3.44963L13.557 0.183875C13.5572 0.183657 13.5574 0.1835 13.5576 0.183312C13.8011 -0.0607185 14.1981 -0.0615005 14.4424 0.183281C14.4426 0.183499 14.4428 0.183656 14.443 0.183844L17.693 3.44959C17.9364 3.69422 17.9356 4.08997 17.6909 4.3335Z"
150 fill="white" fill-opacity="${sort_arrow_up_opacity}" />
151 </g>
152 <g clip-path="url(#clip1_1128_8384)" class="sort_arrow_down">
153 <path
154 d="M7.69087 11.6665C7.44622 11.423 7.0505 11.4239 6.807 11.6686L4.625 13.8612V0.625C4.625 0.279813 4.34519 0 4 0C3.65481 0 3.375 0.279813 3.375 0.625V13.8612L1.193 11.6686C0.949498 11.4239 0.553779 11.423 0.309123 11.6665C0.0644353 11.91 0.0635292 12.3057 0.306998 12.5504L3.557 15.8161C3.55719 15.8163 3.5574 15.8165 3.55759 15.8167C3.80109 16.0607 4.19809 16.0615 4.4424 15.8167C4.44259 15.8165 4.44281 15.8163 4.443 15.8162L7.693 12.5504C7.93643 12.3058 7.93559 11.91 7.69087 11.6665Z"
155 fill="white" fill-opacity="${sort_arrow_down_opacity}" />
156 </g>
157 <defs>
158 <clipPath id="clip0_1128_8384">
159 <rect width="8" height="16" fill="white"
160 transform="matrix(1 0 0 -1 10 16)" />
161 </clipPath>
162 <clipPath id="clip1_1128_8384">
163 <rect width="8" height="16" fill="white" />
164 </clipPath>
165 </defs>
166 </svg>
167 </button>
168 </div>
169 </div>
170 <div class="change_view">
171 <button type="button" class="<#if view=='grid'>active</#if>" onclick="changefilter('${filterdatechangetype}','grid')" ><i
172 class="fa-light fa-grid"></i></button>
173 <button type="button" class="<#if view=='list'>active</#if>" onclick="changefilter('${filterdatechangetype}','list')" ><i class="fa-regular fa-list"></i></button>
174 </div>
175 </div>
176 </div>
177
178 <div class="row">
179 <div class="col-12 video_blocks">
180 <div class="row">
181
182
183<#if entries?has_content>
184 <#assign data = entries>
185 <#if filtersort == "">
186 <#assign data = entries?sort_by("${filterfield}") >
187 <#else>
188 <#assign data = entries?sort_by("${filterfield}")?reverse >
189 </#if>
190 <#list data as curEntry>
191
192 <!-- ${curEntry} get the Journal Article Asset Renderer -->
193 <#assign renderer=curEntry.getAssetRenderer() />
194 <#assign ddmFormValuesReader=renderer.getDDMFormValuesReader() />
195
196 <#assign dmImages=ddmFormValuesReader.getDDMFormFieldValues( 'image' ) />
197 <#assign dmText=ddmFormValuesReader.getDDMFormFieldValues( 'text' ) />
198 <#assign dmDate=ddmFormValuesReader.getDDMFormFieldValues( 'date' ) />
199 <#assign dmUpload=ddmFormValuesReader.getDDMFormFieldValues( 'document_library' ) />
200 <#assign dmTextAreas=ddmFormValuesReader.getDDMFormFieldValues( 'textarea' ) />
201
202 <#assign SectionTitle=getFieldValue(dmText, "Text35759682" )! "" />
203 <#assign SectionContent=getFieldValue(dmText, "Text34014857" )! "" />
204 <#assign SectionVideoJson=getFieldValue(dmUpload, "Upload00305052" )! />
205
206 <#assign ArticleURL=renderer.getURLViewInContext(renderRequest,renderResponse, "")!/>
207 <#assign viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, curEntry) />
208 <#assign videoUrl = "#" />
209 <#if SectionVideoJson?has_content>
210 <#assign
211 SectionVideoJson1 = SectionVideoJson?keep_before_last(',"html"')
212 SectionVideoJson2="'"+SectionVideoJson1+"}'"
213 SectionVideoJson3 = SectionVideoJson2?eval
214 SectionVideoJson4 = SectionVideoJson3?eval
215 fileEntryId = SectionVideoJson4.fileEntryId
216 />
217 <#assign fileEntry= dlAppLocalService.getFileEntry(fileEntryId?number) />
218 <#assign fileVersion = fileEntry.getLatestFileVersion() />
219 <#assign videoUrl = dlUtil.getPreviewURL(fileEntry, fileVersion, themeDisplay, " ", false, true) />
220 </#if>
221 <#if view=="list" >
222 <div class="col-12 video_block fadeInUp wow" data-wow-delay="0.3s">
223 <a href="${viewURL}">
224 <div class="video_block_wrapper video_block_list">
225 <div class="row">
226 <div class="col-lg-5">
227 <div class="image_preview">
228 <video class="videolibrary" controls>
229 <source src="${videoUrl}" type="video/webm">
230 <@liferay_ui["message"] key="pai-video-not-support" />
231 <!--Your browser does not support the video tag.-->
232 </video>
233 </div>
234 </div>
235 <div class="col-lg-7 block_video_descr centered">
236 <h4>${SectionTitle}</h4>
237 <div class="exerpt">
238 ${stringUtil.shorten(SectionContent, 200)}
239 </div>
240 <div class="video_length">
241 <i class="fa-light fa-clock"></i>${dateUtil.getDate(curEntry.getCreateDate(), "MMM dd yyyy", locale)}
242 </div>
243 </div>
244 </div>
245 </div>
246 </a>
247 </div>
248 <#else>
249 <div class="col-lg-4 col-sm-6 video_block fadeInUp wow" data-wow-delay="0.3s">
250 <a href="${viewURL}">
251 <div class="video_block_wrapper">
252 <div class="image_preview">
253 <video class="videolibrary" controls>
254 <source src="${videoUrl}" type="video/webm">
255 <@liferay_ui["message"] key="pai-video-not-support" />
256 <!--Your browser does not support the video tag.-->
257 </video>
258 </div>
259 <div class="video_name">
260 <script>
261 //console.log('inside loop >>>>>>>>>> Video Library List - Asset Publisher Template');
262 </script>
263 ${SectionTitle}
264 </div>
265 </div>
266 </a>
267 </div>
268 </#if>
269
270 </#list>
271</#if>
272
273
274 </div>
275 </div>
276 </div>
277 </div>
278 </section>
279</div>
280<#assign
281redirectURL = themeDisplay.getURLPortal() + "/" + themeDisplay.getLocale().getLanguage()+"/web"+themeDisplay.getScopeGroup().getFriendlyURL()+ themeDisplay.getLayout().getFriendlyURL()
282/>
283 <script>
284 function changefilter(filtertype, view)
285 {
286 var p_p_id = getUrlParameter('p_p_id');
287 if(p_p_id) {
288 var filter = getUrlParameter('filter');
289 if(filter) {
290 var url = replaceUrlParam(window.location.href, 'filter', filtertype);
291 var url = replaceUrlParam(url, 'view', view);
292 window.location.href = url;
293 } else {
294 window.location.href = window.location.href+'&filter='+filtertype+'&view='+view;
295 }
296 } else {
297 window.location.href = '${redirectURL}'+'?filter='+filtertype+'&view='+view;
298 }
299 }
300
301function replaceUrlParam(url, paramName, paramValue)
302{
303 if (paramValue == null) {
304 paramValue = '';
305 }
306 var pattern = new RegExp('\\b('+paramName+'=).*?(&|#|$)');
307 if (url.search(pattern)>=0) {
308 return url.replace(pattern,'$1' + paramValue + '$2');
309 }
310 url = url.replace(/[?#]$/,'');
311 return url + (url.indexOf('?')>0 ? '&' : '?') + paramName + '=' + paramValue;
312}
313var getUrlParameter = function getUrlParameter(sParam) {
314 var sPageURL = window.location.search.substring(1),
315 sURLVariables = sPageURL.split('&'),
316 sParameterName,
317 i;
318
319 for (i = 0; i < sURLVariables.length; i++) {
320 sParameterName = sURLVariables[i].split('=');
321
322 if (sParameterName[0] === sParam) {
323 return sParameterName[1] === undefined ? true : decodeURIComponent(sParameterName[1]);
324 }
325 }
326 return false;
327};
328 </script>
— بند لكل صفحه