Publications Details - GOVKY
An error occurred while processing the template.
Denied access to method or field getParameter of class org.apache.catalina.core.ApplicationHttpRequest ---- FTL stack trace ("~" means nesting-related): - Failed at: #if request.getParameter("articleId")... [in template "20097#20123#163819384" at line 2, column 1] ----
1<#-- Only display one entry based on ID parameter -->
2<#if request.getParameter("articleId")?has_content>
3 <#assign requestedArticleId = request.getParameter("articleId") />
4 <#assign foundEntry = false />
5
6 <#list entries as curEntry>
7 <#assign assetRenderer = curEntry.getAssetRenderer() />
8 <#assign journalArticle = assetRenderer.getArticle() />
9 <#assign currentArticleId = journalArticle.getArticleId() />
10
11 <#if currentArticleId == requestedArticleId>
12 <#assign foundEntry = true />
13 <#assign viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, curEntry) />
14 <#assign ddmContent = journalArticle.getDDMFormValues() />
15
16 <#-- Extract fields from the structure -->
17 <#assign title = "">
18 <#assign category = "">
19 <#assign publishDate = "">
20 <#assign documentId = "">
21 <#assign fileEntryId = "">
22 <#assign details = "">
23 <#assign department = "">
24 <#assign lastUpdated = journalArticle.getModifiedDate()?datetime?string("MMMM d, yyyy") />
25
26 <#list ddmContent.getDDMFormFieldValues() as fieldValue>
27 <#if fieldValue.getName() == "Text36578764">
28 <#assign title = fieldValue.getValue().getString(locale) />
29 <#elseif fieldValue.getName() == "Select80075386">
30 <#assign categoryValue = fieldValue.getValue().getString(locale) />
31 <#if categoryValue?has_content>
32 <#if categoryValue == "Option86236649">
33 <#assign category = "Consultation" />
34 <#elseif categoryValue == "Option51489364">
35 <#assign category = "Form" />
36 <#elseif categoryValue == "Option91326898">
37 <#assign category = "Guide" />
38 <#elseif categoryValue == "Option72179618">
39 <#assign category = "Legislation" />
40 <#elseif categoryValue == "Option41984694">
41 <#assign category = "Policy" />
42 <#elseif categoryValue == "Option58473093">
43 <#assign category = "Post Meeting Summary" />
44 <#elseif categoryValue == "Option93665212">
45 <#assign category = "Report" />
46 <#elseif categoryValue == "Option06022783">
47 <#assign category = "Template" />
48 </#if>
49 </#if>
50 <#elseif fieldValue.getName() == "Date78780533">
51 <#assign publishDateValue = fieldValue.getValue().getString(locale) />
52 <#if publishDateValue?has_content>
53 <#attempt>
54 <#assign publishDate = publishDateValue?datetime("yyyy-MM-dd'T'HH:mm:ss")?string("MMMM d, yyyy") />
55 <#recover>
56 <#attempt>
57 <#assign publishDate = publishDateValue?date("yyyy-MM-dd")?string("MMMM d, yyyy") />
58 <#recover>
59 <#assign publishDate = publishDateValue />
60 </#recover>
61 </#recover>
62 </#if>
63 <#elseif fieldValue.getName() == "DocumentLibrary41826524">
64 <#assign documentId = fieldValue.getValue().getString(locale) />
65 <#-- Try to parse the JSON string to extract fileEntryId -->
66 <#if documentId?has_content && documentId != "0">
67 <#attempt>
68 <#assign documentObj = documentId?eval_json />
69 <#if documentObj.fileEntryId??>
70 <#assign fileEntryId = documentObj.fileEntryId />
71 </#if>
72 <#recover>
73 <#-- If JSON parsing fails, use the original ID -->
74 <#assign fileEntryId = documentId />
75 </#recover>
76 </#if>
77 <#elseif fieldValue.getName() == "RichText76489510"> <#-- Assuming this field exists for details/description -->
78 <#assign details = fieldValue.getValue().getString(locale) />
79 <#elseif fieldValue.getName() == "Text94712365"> <#-- Assuming this field exists for department -->
80 <#assign department = fieldValue.getValue().getString(locale) />
81 </#if>
82 </#list>
83
84 <#-- Create the direct document download URL -->
85 <#assign downloadURL = "">
86 <#if fileEntryId?has_content && fileEntryId != "0">
87 <#assign downloadURL = themeDisplay.getPortalURL() + "/c/document_library/get_file?fileEntryId=" + fileEntryId />
88 </#if>
89
90 <div class="publication-detail-page">
91 <div class="publication-header">
92 <a href="javascript:history.back()" class="back-link">
93 <span class="lexicon-icon">
94 <svg class="lexicon-icon lexicon-icon-angle-left" role="presentation">
95 <use xlink:href="${themeDisplay.getPathThemeImages()}/clay/icons.svg#angle-left" />
96 </svg>
97 </span>
98 Report
99 </a>
100
101 <h1 class="publication-title">${title}</h1>
102
103 <div class="publication-meta">
104 <p class="publication-date">Published: ${publishDate}</p>
105 </div>
106 </div>
107
108 <hr class="separator" />
109
110 <div class="publication-documents">
111 <h2>Documents</h2>
112
113 <div class="document-item">
114 <div class="document-icon">
115 <#if downloadURL?has_content>
116 <a href="${downloadURL}" download class="document-icon-link">
117 <span class="lexicon-icon">
118 <svg class="lexicon-icon lexicon-icon-document-pdf" role="presentation">
119 <use xlink:href="${themeDisplay.getPathThemeImages()}/clay/icons.svg#document-pdf" />
120 </svg>
121 </span>
122 </a>
123 <#else>
124 <span class="lexicon-icon">
125 <svg class="lexicon-icon lexicon-icon-document-pdf" role="presentation">
126 <use xlink:href="${themeDisplay.getPathThemeImages()}/clay/icons.svg#document-pdf" />
127 </svg>
128 </span>
129 </#if>
130 </div>
131 <div class="document-info">
132 <#if downloadURL?has_content>
133 <a href="${downloadURL}" class="document-title" download>${title}</a>
134 <#else>
135 <a href="${downloadURL}" class="document-title" download><span class="document-title">${title}</span></a>
136 </#if>
137 </div>
138 </div>
139 </div>
140
141 <div class="publication-details">
142 <h2>Details</h2>
143 <#if details?has_content>
144 <div class="details-content">
145 ${details}
146 </div>
147 <#else>
148 <p class="details-content">
149 <#if category == "Report">
150 ${title} for ${department!''}.
151 <#else>
152 ${title}.
153 </#if>
154 </p>
155 </#if>
156 </div>
157
158 <hr class="separator" />
159
160 <div class="publication-footer">
161 <p class="last-updated">Last updated: ${lastUpdated}</p>
162 <#if department?has_content>
163 <p class="department">Category: ${department}</p>
164 <#elseif category?has_content>
165 <p class="department">Category: ${category}</p>
166 </#if>
167 </div>
168 </div>
169
170 <#break>
171 </#if>
172 </#list>
173
174 <#if !foundEntry>
175 <div class="alert alert-info">
176 <span>Publication not found. Requested ID: ${requestedArticleId}</span>
177 </div>
178 </#if>
179<#else>
180 <div class="alert alert-info">
181 <span>No article ID specified. Please select a publication from the list.</span>
182 </div>
183</#if>
184
185<style>
186 /* Styles for the publication detail page */
187 .publication-detail-page {
188 margin: 0 auto;
189 padding: 2rem 1rem;
190 font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
191 }
192
193 .publication-header {
194 margin-bottom: 2rem;
195 }
196
197 .back-link {
198 display: inline-flex;
199 align-items: center;
200 color: #333;
201 text-decoration: none;
202 margin-bottom: 1rem;
203 font-weight: 500;
204 }
205
206 .back-link .lexicon-icon {
207 width: 16px;
208 height: 16px;
209 margin-right: 0.5rem;
210 }
211
212 .publication-title {
213 font-size: 2.25rem;
214 font-weight: 700;
215 line-height: 1.2;
216 margin-bottom: 1rem;
217 color: #1a1a1a;
218 }
219
220 .publication-meta {
221 color: #555;
222 font-size: 1rem;
223 }
224
225 .separator {
226 border: 0;
227 border-top: 1px solid #e7e7ed;
228 margin: 2rem 0;
229 }
230
231 .publication-documents,
232 .publication-details {
233 margin-bottom: 2rem;
234 }
235
236 .publication-documents h2,
237 .publication-details h2 {
238 font-size: 1.5rem;
239 font-weight: 600;
240 margin-bottom: 1.25rem;
241 color: #1a1a1a;
242 }
243
244 .document-item {
245 display: flex;
246 align-items: center;
247 padding: 1rem;
248 background-color: #f8f9fa;
249 border-radius: 0.5rem;
250 margin-bottom: 1rem;
251 }
252
253 .document-icon {
254 margin-right: 1rem;
255 }
256
257 .document-icon-link {
258 display: inline-block;
259 }
260
261 .document-icon-link:hover .lexicon-icon-document-pdf {
262 fill: #004785;
263 }
264
265 .lexicon-icon-document-pdf {
266 fill: #0067B1;
267 width: 32px;
268 height: 32px;
269 }
270
271 .document-title {
272 font-weight: 500;
273 color: #0067B1;
274 text-decoration: none;
275 }
276
277 .document-title:hover {
278 text-decoration: underline;
279 }
280
281 .details-content {
282 line-height: 1.6;
283 color: #333;
284 }
285
286 .publication-footer {
287 color: #6b6c7e;
288 font-size: 0.875rem;
289 }
290
291 .last-updated,
292 .department {
293 margin-bottom: 0.5rem;
294 }
295</style>
Sign Up For Our Newsletter
Get the latest Government updates delivered straight to your inbox.