Asset Publisher

An error occurred while processing the template.
java.lang.reflect.InvocationTargetException: null
1<#-- Display-name: Sub-site About --> 
2<#-- Requires: Asset to be Web Content --> 
3<#-- Note: This ADT will display only ONE web content --> 
4 
5<#-- Taglibs --> 
6<#assign liferay_ui = taglibLiferayHash["/WEB-INF/tld/liferay-ui.tld"] /> 
7<#assign liferay_util = taglibLiferayHash["/WEB-INF/tld/liferay-util.tld"] /> 
8<#assign liferay_portlet = taglibLiferayHash["/WEB-INF/tld/liferay-portlet.tld"] /> 
9 
10<#-- Services --> 
11<#assign companyLocalService = serviceLocator.findService("com.liferay.portal.service.CompanyLocalService") /> 
12<#assign classNameLocalService = serviceLocator.findService("com.liferay.portal.service.ClassNameLocalService") /> 
13<#assign ddmStructureLocalService = serviceLocator.findService("com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService") /> 
14<#assign dlFileEntryLocalService = serviceLocator.findService("com.liferay.portlet.documentlibrary.service.DLFileEntryLocalService") /> 
15 
16<#assign articleClassNameId = classNameLocalService.getClassNameId("com.liferay.portlet.journal.model.JournalArticle") /> 
17 
18<#assign portletNamespace = renderResponse.getNamespace() /> 
19 
20<#if entries?has_content> 
21	<#assign entry = entries[0] /> 
22 
23	<#-- Get article --> 
24	<#assign article = entry.getAssetRenderer().getArticle() /> 
25	<#assign articleXml = saxReaderUtil.read(article.getContentByLocale(locale)) /> 
26	 
27	<#-- Get structure--> 
28	<#assign companyId = article.getCompanyId() /> 
29	<#assign structureKey = article.getStructureId() /> 
30	<#assign company = companyLocalService.getCompany(companyId) /> 
31	<#assign globalGroupId = company.getGroupId() /> 
32	<#assign structure = ddmStructureLocalService.getStructure(globalGroupId, articleClassNameId, structureKey)! /> 
33	<#assign structureName = structure.getName("en_US") /> 
34 
35	<#-- Get structure type--> 
36	<#assign isAdministration = (structureName = "Administration") /> 
37	<#assign isFacilityAdmin = (structureName = "Facility Admin") /> 
38	<#assign isOffice = (structureName = "Office") /> 
39 
40 
41	<#assign readId = "read" + portletNamespace/> 
42 
43	<div id="${readId}" class="site-content"> 
44 
45		<#-- Start - Logic for print--> 
46		<#assign viewMode = renderRequest.getParameter("viewMode")!"normal" /> 
47		<#assign isPrintViewMode = viewMode?contains("print") /> 
48		<#assign printUrl = renderResponse.createRenderURL() /> 
49		<#assign void = printUrl.setWindowState("pop_up") /> 
50		<#assign void = printUrl.setParameter("viewMode", "print") /> 
51 
52		<div class="article-meta-wrap"> 
53			<div class="article-meta"> 
54				<div class="print-button"> 
55					<#if isPrintViewMode> 
56						<a href="javascript:print();" class="print">${languageUtil.get(locale, "article-meta-print")}</a> 
57						<script type="text/javascript">print();</script> 
58					<#else> 
59						<a href="${printUrl}" class="print-portlet">${languageUtil.get(locale, "article-meta-print")}</a> 
60					</#if>  
61				</div> 
62				<#if !isPrintViewMode> 
63					<div id="readspeaker_button1" class="rs_skip rsbtn_colorskin rs_preserve"> 
64					    <a rel="nofollow" class="rsbtn_play" accesskey="L" title="${languageUtil.get(locale, "article-meta-readspeaker-link-title")}" href="https://app.readspeaker.com/cgi-bin/rsent?customerid=5949&amp;lang=${languageUtil.get(locale, "article-meta-readspeaker-language")}&amp;readid=${readId}&amp;url=${currentURL?url('ISO-8859-1')}"> 
65					        <span class="rsbtn_left rspart"><span class="rsbtn_text"><span>${languageUtil.get(locale, "article-meta-readspeaker-link-text")}</span></span></span> 
66					        <span class="rsbtn_right rsplay rspart"></span> 
67					    </a> 
68					</div> 
69				</#if> 
70			</div> 
71		</div> 
72		<#-- End - Logic for print --> 
73 
74		<h1> 
75			<@liferay_ui.message key="site-content-resources" /> 
76		</h1> 
77 
78		<#assign resourceNodes = articleXml.selectNodes("//dynamic-element[@name='resourceName']") /> 
79 
80		<#if resourceNodes?has_content> 
81			<#list resourceNodes as resourceNode> 
82 
83				<#assign resourceName = resourceNode.valueOf("dynamic-content/text()") /> 
84				<#assign resourceDescription = resourceNode.valueOf("dynamic-element[@name='resourceDescription']/dynamic-content/text()") /> 
85				<#assign resourceFilesNodes = resourceNode.selectNodes("dynamic-element[@name='resourceFile']") /> 
86 
87				<h4> 
88					${resourceName} 
89				</h4> 
90				<p> 
91					${resourceDescription} 
92				</p> 
93 
94				<#if resourceFilesNodes?has_content> 
95					<#list resourceFilesNodes as resourceFilesNode> 
96 
97						<#assign resourcePath = resourceFilesNode.valueOf("dynamic-content/text()") /> 
98						<#assign resourceData = resourcePath?split("/") /> 
99						<#assign resourceUUID = resourceData[5]! /> 
100 
101						<#if resourceUUID?contains("?")> 
102							<#assign resourceUUID = resourceUUID?split("?") /> 
103							<#assign resourceUUID = resourceUUID[0] /> 
104						</#if> 
105 
106						<#assign docTitle = "file" /> 
107						<#assign thumbUrl = "/html/themes/control_panel/images/file_system/large/document.png" /> 
108 
109						<#assign dlfFileEntry = dlFileEntryLocalService.getDLFileEntryByUuidAndCompanyId(resourceUUID, companyId) ! /> 
110 
111						<#if dlfFileEntry?has_content> 
112							<#assign mimeType = dlfFileEntry.getMimeType() /> 
113							<#if mimeType = ("application/pdf")> 
114								<#assign thumbUrl = "/html/themes/control_panel/images/file_system/large/pdf.png" /> 
115							<#elseif mimeType?contains("image/")> 
116								<#assign thumbUrl = resourcePath /> 
117							</#if> 
118 
119							<#assign docTitle = dlfFileEntry.getTitle() /> 
120						</#if> 
121 
122						<@liferay_ui["app-view-entry"] 
123							displayStyle="descriptive" 
124							folder=false 
125							showCheckbox=false 
126							thumbnailSrc=thumbUrl 
127							thumbnailStyle="" 
128							title=docTitle 
129							url=resourcePath 
130						/> 
131 
132					</#list> 
133				</#if> 
134			</#list> 
135		</#if> 
136	</div> 
137</#if> 

Page Ratings

Average (2 Votes)