Belföldi termékértékesítés adófizetés nélkül? A válasz: igen! - Vámprogram
An error occurred while processing the template.
Java method "com.sun.proxy.$Proxy84.getDLFileEntryByUuidAndGroupId(String, long)" threw an exception when invoked on com.sun.proxy.$Proxy84 object "com.liferay.portlet.documentlibrary.service.impl.DLFileEntryLocalServiceImpl@329d8d11"; see cause exception in the Java stack trace. ---- FTL stack trace ("~" means nesting-related): - Failed at: mainPageImageFileEntry = dlFileEntryL... [in template "20155#20195#BLOG" at line 23, column 25] ----
1<#assign groupId = themeDisplay.getLayout().getGroupId() />
2<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") />
3<#assign ja = journalArticleLocalService.getArticle(groupId, .vars['reserved-article-id'].data ) />
4<#assign resourceprimKey = ja.getResourcePrimKey() />
5<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") />
6<#assign
7 assetEntry = assetEntryLocalService.getEntry("com.liferay.journal.model.JournalArticle", resourceprimKey)
8 fields = assetEntry.getAssetRenderer().getDDMFormValuesReader().getDDMFormValues().getDDMFormFieldValuesMap()
9 abstract = fields["abstract"][0].getValue().getString(locale)
10 content = fields["content"][0].getValue().getString(locale)
11 mainPageImage = ""
12 image = ""
13 dlFileEntryLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService")
14/>
15<#if fields["mainPageImage"]?has_content && fields["mainPageImage"][0]?? >
16 <#assign
17 mainPageImageData = fields["mainPageImage"][0].getValue().getString(locale)
18 mainPageImageJsonImage = jsonFactoryUtil.createJSONObject(mainPageImageData)
19 />
20 <#if mainPageImageJsonImage.uuid?has_content >
21 <#assign
22 groupId = mainPageImageJsonImage.getLong("groupId")
23 mainPageImageFileEntry = dlFileEntryLocalService.getDLFileEntryByUuidAndGroupId(mainPageImageJsonImage.uuid, groupId)
24 mainPageImageAssetEntry = assetEntryLocalService.getEntry("com.liferay.document.library.kernel.model.DLFileEntry", mainPageImageFileEntry.fileEntryId)
25 mainPageImageAssetRenderer = mainPageImageAssetEntry.assetRenderer
26 mainPageImage = mainPageImageAssetRenderer.getURLDownload(themeDisplay)
27 />
28 </#if>
29</#if>
30<#if fields["image"]?has_content && fields["image"][0]?? >
31 <#assign
32 imageData = fields["image"][0].getValue().getString(locale)
33 imageJsonImage = jsonFactoryUtil.createJSONObject(imageData)
34 />
35 <#if imageJsonImage.uuid?has_content >
36 <#assign
37 groupId = imageJsonImage.getLong("groupId")
38 imageFileEntry = dlFileEntryLocalService.getDLFileEntryByUuidAndGroupId(imageJsonImage.uuid, groupId)
39 imageAssetEntry = assetEntryLocalService.getEntry("com.liferay.document.library.kernel.model.DLFileEntry", imageFileEntry.fileEntryId)
40 imageAssetRenderer = imageAssetEntry.assetRenderer
41 image = imageAssetRenderer.getURLDownload(themeDisplay)
42 />
43 </#if>
44</#if>
45<#assign categories = assetEntry.getCategories() />
46<#assign tags = assetEntry.getTags() />
47<#assign portalPreferencesService = serviceLocator.findService("com.liferay.portal.kernel.service.PortalPreferencesLocalService") />
48<#assign preferences = portalPreferencesService.getPreferences(themeDisplay.getCompanyId(), 1) />
49<#assign homeURL = themeDisplay.getURLPortal() />
50<#assign searchPageLink = preferences.getValue("key-search-page-link", "") />
51<#assign searchPageLink = "${homeURL + searchPageLink}" />
52<#assign displayDate = dateUtil.getDate(ja.getDisplayDate(),"dd/MM", locale) />
53<#assign displayYear = dateUtil.getDate(ja.getDisplayDate(),"yyyy", locale) />
54<#if locale.getLanguage() == "hu" >
55 <#assign displayDate = dateUtil.getDate(ja.getDisplayDate(),"MMM d.", locale) />
56</#if>
57<#assign bgImage = mainPageImage />
58<#assign class = "" />
59<#if bgImage == "" >
60 <#assign bgImage = image />
61</#if>
62<#if bgImage == "" >
63 <#assign bgImage = "/o/regens-theme/images/news_default_bg.jpg" />
64 <#assign class = "default" />
65</#if>
66<div class="content-with-parallax-jumbotron ${class}">
67 <div class="bg"></div>
68 <div class="jumbotron container">
69 <h1>${ja.getTitle(locale)}</h1>
70 <div class="full-date">
71 <span class="year">${displayYear}</span><#if locale.getLanguage() == "hu">. <#else>/</#if><span class="month-day"> ${displayDate}</span>
72 </div>
73 </div>
74 <div class="structure-content container">
75 <div class="abstract">
76 ${abstract}
77 </div>
78 <div class="content">
79 ${content}
80 </div>
81 <p>
82 <#if tags?? >
83 <#list tags as tag >
84 <#assign tagName = tag.getName() />
85 <#if (tagName?index_of("--") > -1) >
86 <#if locale.getLanguage() == "en">
87 <#assign tagName = tagName?substring(0, tagName?index_of("--")) />
88 <#else>
89 <#assign tagNameInd = tagName?index_of("--") + 2 />
90 <#assign tagName = tagName?substring(tagNameInd) />
91 </#if>
92 </#if>
93 <div class="tag">
94 <a href="/search?q=${htmlUtil.escape(tagName)}">
95 <span>${tagName}</span>
96 </a>
97 </div>
98 </#list>
99 </#if>
100 </p>
101 </div>
102</div>
103
104<style>
105.bg {
106 background-image: linear-gradient( rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2) ), url('${bgImage}') !important;
107}
108#content {
109 max-width: 100% !important;
110 padding: 0 !important;
111}
112#main-content {
113 max-width: 100% !important;
114}
115</style>
116
117<@liferay_util["html-top"] outputKey="news">
118 <meta property="og:title" content="${ja.getTitle(locale)}">
119 <meta property="og:url" content="${themeDisplay.getPortalURL() + themeDisplay.getURLCurrent()}">
120 <meta property="og:type" content="article">
121 <#if image?? >
122 <meta property="og:image" content="${image}">
123 <#elseif bgImage?? >
124 <meta property="og:image" content="${bgImage}">
125 </#if>
126 <meta property="og:description" content="${abstract}">
127 <meta property="og:locale" content="${locale}">
128 <meta property="og:site_name" content="${themeDisplay.getSiteGroupName()}">
129</@>
130
131<script>
132<#if image?? >
133 document.querySelector('meta[name="og:image"]').setAttribute("content", "${image}");
134 <#elseif bgImage?? >
135 document.querySelector('meta[name="og:image"]').setAttribute("content", "${bgImage}");
136 </#if>
137</script>