حصل خطأ عند معالجة القالب.
The following has evaluated to null or missing: ==> fileEntry.contentUrl [in template "31942#31983#66302" at line 18, column 106] ---- 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 viewURL = themeDisplay.getPor... [in template "31942#31983#66302" at line 18, column 25] ----
1<#assign dateFormat = "dd MMMMM yyyy" />
2
3<section class="file-list">
4 <#if entries?has_content>
5 <ul>
6 <#list entries as entry>
7
8 <#assign entry = entry />
9 <#assign type = entry.getAssetRendererFactory().getType() />
10 <#assign assetRenderer = entry.getAssetRenderer() />
11 <#assign entryTitle = htmlUtil.escape(assetRenderer.getTitle(locale)) />
12 <#assign viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, entry) />
13
14 <#if assetRenderer.getType() == "document">
15
16 <#assign dlFileEntryId = assetRenderer.getClassPK() />
17 <#assign fileEntry = restClient.get('/headless-delivery/v1.0/documents/${dlFileEntryId}') />
18 <#assign viewURL = themeDisplay.getPortalURL() + themeDisplay.getPathContext() + fileEntry.contentUrl />
19 <#assign size = (fileEntry.sizeInBytes / 1000000) />
20 <li>
21
22 <a href="${viewURL}" target="_new">
23 <div class="file-icon">
24 <@getIcon type="${fileEntry.encodingFormat}" />
25 </div>
26 <div class="file-label">
27 <div class="file-name">${entryTitle}</div>
28 <div class="file-size">${size?string["0.##"]} MB</div>
29 </div>
30 </a>
31
32 </li>
33 </#if>
34 </#list>
35 </ul>
36 </#if>
37</section>
38
39<#macro getIcon type>
40 <#switch type>
41 <#case "image/jpeg">
42 <#case "image/pjpeg">
43 <#case "image/png">
44 <#case "image/gif">
45 <i class="fa fa-file-image-o" aria-hidden="true"></i>
46 <#break>
47
48 <#case "application/pdf">
49 <i class="fa fa-file-pdf-o" aria-hidden="true"></i>
50 <#break>
51
52 <#case "application/msword">
53 <#case "application/vnd.openxmlformats-officedocument.wordprocessingml.document">
54 <i class="fa fa-file-word-o" aria-hidden="true"></i>
55 <#break>
56
57 <#case "application/excel">
58 <#case "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet">
59 <i class="fa fa-file-excel-o" aria-hidden="true"></i>
60 <#break>
61
62 <#case "application/mspowerpoint">
63 <#case "application/vnd.openxmlformats-officedocument.presentationml.presentation">
64 <i class="fa fa-file-powerpoint-o" aria-hidden="true"></i>
65 <#break>
66
67 <#case "video/mp4">
68 <#case "video/quicktime">
69 <#case "video/x-ms-wmv">
70 <i class="fa fa-file-video-o" aria-hidden="true"></i>
71 <#break>
72
73 <#case "audio/mpeg3">
74 <#case "audio/x-mpeg-3">
75 <#case "video/mpeg">
76 <#case "video/x-mpeg">
77 <#case "audio/wav">
78 <#case "audio/x-wav">
79 <i class="fa fa-file-audio-o" aria-hidden="true"></i>
80 <#break>
81
82 <#case "text/plain">
83 <i class="fa fa-file-text-o" aria-hidden="true"></i>
84 <#break>
85
86 <#case "application/x-compressed">
87 <#case "application/x-zip-compressed">
88 <#case "application/zip">
89 <#case "multipart/x-zip">
90 <i class="fa fa-file-archive-o" aria-hidden="true"></i>
91 <#break>
92
93 <#default>
94 <i class="fa fa-file-o" aria-hidden="true"></i>
95 </#switch>
96</#macro>