Jesteś tutaj:
 

W oczekiwaniu na "1946"

W oczekiwaniu na "1946"

Wystąpił błąd podczas przetwarzania szablonu.
Invocation of method 'getFriendlyURLLayout' in  class java.lang.Class threw exception com.liferay.portal.NoSuchLayoutException at 20289ARTICLE-WROTA[line 23, column 59]
1<div class="article-wrapper"> 
2    #if ($title != "") 
3        <h3 class="article-title">$title.getData()</h3> 
4    #end 
5 
6    ######################## 
7    ## Data z wydawcy treści  
8    ######################## 
9 
10	 
11    #set ($Arrays = $portal.class.forName("java.util.Arrays")) 
12    #set ($redirectUrlParts = $stringUtil.split($request.get("parameters").get("redirect"), "?")) 
13    #set ($redirectPartsList = $Arrays.asList($redirectUrlParts)) 
14    #set ($portletId = $httpUtil.getParameter($request.get("parameters").get("redirect"), "p_p_id", false)) 
15	 
16	#if (not $redirectPartsList.isEmpty()) 
17 
18		## pobranie layoutu  
19	    #set ($redirectUrl = $redirectPartsList.get(0)) 
20	    #set ($portalUtil = $portal.class.forName("com.liferay.portal.util.PortalUtil")) 
21	    #set ($layoutLocalServiceUtil = $portal.class.forName("com.liferay.portal.service.LayoutLocalServiceUtil")) 
22		#set ($friendlyUrl = $redirectUrl.replaceAll($portalUtil.getPortalURL($themeDisplay),"")) 
23	    #set ($friendLayout = $layoutLocalServiceUtil.getFriendlyURLLayout($getterUtil.getLong($groupId),false,$friendlyUrl)) 
24	     
25	    ## pobranie preferencji portletu 
26	    #set ($PortletPreferencesLocalServiceUtil = $portal.class.forName("com.liferay.portal.service.PortletPreferencesLocalServiceUtil")) 
27		#set ($portletPrefs = $PortletPreferencesLocalServiceUtil.getPortletPreferences($friendLayout.plid, $portletId)) 
28		#set ($preferences = $PortletPreferencesLocalServiceUtil.getPreferences($friendLayout.companyId,$portletPrefs.get(0).ownerId,$portletPrefs.get(0).ownerType,$friendLayout.getPlid(), $portletId, "")) 
29 
30		## odczytanie metadanych 
31     	#set ($listUtil = $PortletPreferencesLocalServiceUtil.class.forName("com.liferay.portal.kernel.util.ListUtil")) 
32		#set ($metadataFields = $listUtil.fromArray($stringUtil.split($preferences.getValue("metadata-fields", "")))) 
33		 
34		## pobranie AssetEntry 
35		#set ($JournalArticleLocalServiceUtil = $portal.class.forName("com.liferay.portlet.journal.service.JournalArticleLocalServiceUtil")) 
36		#set ($article = $JournalArticleLocalServiceUtil.getArticle($getterUtil.getLong($groupId),$reserved-article-id.data)) 
37		#set ($AssetEntryLocalServiceUtil = $portal.class.forName("com.liferay.portlet.asset.service.AssetEntryLocalServiceUtil")) 
38		#set ($AssetEntry = $AssetEntryLocalServiceUtil.getEntry("com.liferay.portlet.journal.model.JournalArticle",$article.getResourcePrimKey())) 
39		#set ($Validator = $portal.class.forName("com.liferay.portal.kernel.util.Validator")) 
40		 
41		## formatownie daty 
42		#set ($FastDateFormatFactoryUtil = $portal.class.forName("com.liferay.portal.kernel.util.FastDateFormatFactoryUtil")) 
43		#set ($LocaleUtil = $portal.class.forName("com.liferay.portal.kernel.util.LocaleUtil")) 
44		#set ($format = $FastDateFormatFactoryUtil.getSimpleDateFormat("d MMMMMMMMMMM yyyy", $LocaleUtil.getDefault())) 
45  
46		<div class="asset-metadata">  
47			#foreach($metadataField in $metadataFields) 
48				#if($metadataField.equals("date"))	 
49					#if($Validator.isNull($AssetEntry.getStartDate())) 
50						#if($Validator.isNotNull($AssetEntry.getPublishDate())) 
51							#set ($dateToPrint = $format.format($AssetEntry.publishDate)) 
52						#end 
53					#else 			 
54						#set ($dateToPrint = $format.format($AssetEntry.startDate)) 
55					#end 
56				#elseif($metadataField.equals("create-date")) 
57					#set ($dateToPrint = $format.format($AssetEntry.createDate)) 
58				#elseif($metadataField.equals("modified-date"))	 
59					#set ($dateToPrint = $format.format($AssetEntry.modifiedDate)) 
60				#elseif($metadataField.equals("publish-date")) 
61					#set ($dateToPrint = $format.format($AssetEntry.publishDate)) 
62				#elseif($metadataField.equals("expiration-date")) 
63					#set ($dateToPrint = $format.format($AssetEntry.expirationDate)) 
64				#end 
65				#if ($metadataField.indexOf("date") != -1) 
66					#set ($dateToPrint = $dateToPrint.replaceAll("styczeń", "stycznia")) 
67					#set ($dateToPrint = $dateToPrint.replaceAll("luty", "lutego")) 
68					#set ($dateToPrint = $dateToPrint.replaceAll("marzec", "marca")) 
69					#set ($dateToPrint = $dateToPrint.replaceAll("kwiecień", "kwietnia")) 
70					#set ($dateToPrint = $dateToPrint.replaceAll("maj", "maja")) 
71					#set ($dateToPrint = $dateToPrint.replaceAll("czerwiec", "czerwca")) 
72					#set ($dateToPrint = $dateToPrint.replaceAll("lipiec", "lipca")) 
73					#set ($dateToPrint = $dateToPrint.replaceAll("sierpień", "sierpnia")) 
74					#set ($dateToPrint = $dateToPrint.replaceAll("wrzesień", "września")) 
75					#set ($dateToPrint = $dateToPrint.replaceAll("październik", "października")) 
76					#set ($dateToPrint = $dateToPrint.replaceAll("listopad", "listopada")) 
77					#set ($dateToPrint = $dateToPrint.replaceAll("grudzień", "grudnia")) 
78					 
79					<span class="metadata-entry metadata-date" > 
80						$dateToPrint 
81					</span>	 
82				#end		 
83			#end 
84		</div> 
85  	#end 
86  	 
87    ################################## 
88    ## KONIEC Data z wydawcy treści  
89    ################################## 
90 	 
91 
92    #if ($content != "") 
93        <div class="article-body"> 
94        #if ($summary != "") 
95            <div class="article-lead"> 
96                $summary.getData() 
97            </div> 
98        #end         
99            $content.getData() 
100        </div> 
101    #end 
102      <ul> 
103    #foreach ($item in $attachment-name.getSiblings()) 
104        #set ($item_name=$item.file-description.getData())       
105        #if ($item_name == "") 
106            #set ($item_name=$item.getData())        
107        #end     
108        #if ($item_name.trim().length() > 0) 
109        <li><a href="$item.file-link.getData()">$item_name</a></li> 
110        #end     
111    #end 
112      </ul> 
113 
114 
115 
116    <div class="article-gallery"> 
117        #set ($galleryImages = []) 
118         
119        ##################### 
120        ## Zdjecia dodatkowe 
121        ##################### 
122        #if ($photo) 
123            #foreach ($item in $photo.getSiblings() ) 
124                #if ($item.data !='') 
125                    #set ($galImage = {"url" : "$item.data" , "thumbUrl" : "$item.data&height=120", "desc" : "$htmlUtil.escapeAttribute($item.photodescription.data)"}) 
126                    #set ($VOID = $galleryImages.add($galImage)) 
127                #end 
128            #end 
129        #end 
130 
131        ##################### 
132        ## Zdjecia z galerii 
133        ##################### 
134        #set ($IGImageLocalServiceUtil = $portal.class.forName("com.liferay.portlet.imagegallery.service.IGImageLocalServiceUtil").newInstance()) 
135        #set ($ImageLocalServiceUtil = $portal.class.forName("com.liferay.portal.service.ImageLocalServiceUtil").newInstance()) 
136         
137        #if ($gallery-photo && $gallery-photo.data != "") 
138            #set ($url = $getterUtil.getString($gallery-photo.data))  
139        #end 
140                 
141        #if ($url && $url != "") 
142         
143            #set ($uuid = $getterUtil.getString($httpUtil.getParameter($url, "uuid", false))) 
144            #set ($groupId = $getterUtil.getLong($httpUtil.getParameter($url, "groupId", false))) 
145            #set ($igImage = $IGImageLocalServiceUtil.getImageByUuidAndGroupId($uuid, $groupId)) 
146            #set ($smallImageId = $igImage.getSmallImageId()) 
147         
148         
149            #set ($folderId = $igImage.getFolderId()) 
150            #set ($folderImages = $IGImageLocalServiceUtil.getImages($groupId, $folderId))   
151             
152            #if ($folderImages) 
153                #set ($index = 0) 
154                #set ($size = $folderImages.size()) 
155                #set ($currentWidth = 0) 
156                #foreach ($folderimg in $sortTool.sort($folderImages,"name:asc"))    
157 
158                    #if ($folderimg.description == $folderimg.nameWithExtension)    
159                      #set ($folderimg.description = "") 
160                    #end 
161         
162                    #set ($imgImageId = $folderimg.custom1ImageId) 
163                    #set ($widthRatio = 1.0) 
164                    #if ($imgImageId == 0) 
165                        #set ($imgImageId = $folderimg.largeImageId) 
166                    #end 
167                    #set ($img = $ImageLocalServiceUtil.getImage($imgImageId)) 
168                    #set ($ratio = (100.0 / $img.height)) 
169                    #if ($ratio > 1.0) 
170	                    #set ($ratio = 1) 
171                    #end 
172                    #set ($imgWidth = ($ratio * $img.width)) 
173                    #set ($imgWidth = $imgWidth.intValue()) 
174                    #set ($width = ($ratio * $img.width)) 
175                    #set ($width = $width.intValue()) 
176                    #set ($width2 = $width.intValue() + 30) 
177                     
178                    #set ($galImage = {"width": $width, "width2" : $width2, "url" : "/image/image_gallery?uuid=$folderimg.getUuid()&groupId=$folderimg.getGroupId()" , "thumbUrl" : "/image/image_gallery?uuid=$folderimg.getUuid()&groupId=$folderimg.getGroupId()&width=$width", "desc" : "$htmlUtil.escapeAttribute($folderimg.description)"}) 
179                    #set ($VOID = $galleryImages.add($galImage)) 
180         
181                    #set ($index = $index + 1) 
182         
183                #end 
184            #end 
185             
186        #end 
187         
188         
189         
190        #if ($galleryImages.size() > 0) 
191	        <div class="gallery-$reserved-article-id.data"> 
192	            <h4>#language("image-gallery")</h4> 
193	             
194	            #set ($currentWidth = 0) 
195	            #set ($index = 0) 
196	        	<div class="image-gallery-row"> 
197	            #foreach ($img in $galleryImages) 
198	                #if ($currentWidth > (710 - $img.width2)) 
199	                    #set ($currentWidth = 0) 
200	                    <!--  </div> --> 
201	                #end 
202	                
203	                #if ($currentWidth == 0) 
204	                    <!-- <div class="image-gallery-row">  --> 
205	                #end 
206	                #set ($currentWidth = $currentWidth + $img.width2) 
207	     
208	                <a class="rsImg gallery-image" href="$img.url" rel="prettyPhoto[$reserved-article-id.data]"><img class="rsTmb gallery-image-thumb" src="$img.thumbUrl" width="$width" alt="$img.desc"/></a> 
209	     
210	                #set ($index = $index + 1) 
211	                #if ($index == $galleryImages.size()) 
212	                   <!-- </div>  --> 
213	                #end 
214	            #end 
215	            </div> 
216	        </div>     
217        #end 
218    </div> 
219</div> 
 
 
 
 

Polecamy: