An error occurred while processing the template.
Error on line 23, column 5 in 20155#20195#38529
DLAppService.getFolder(groupId,parentId,foldername.getData()) is undefined.
It cannot be assigned to firstFolder
1<#assign  
2    DLAppService = serviceLocator.findService("com.liferay.portlet.documentlibrary.service.DLAppService")  
3    DLFolderLocalService = serviceLocator.findService("com.liferay.portlet.documentlibrary.service.DLFolderLocalService")  
4    parentId = 0 
5/> 
6 
7<#if Parent_folder_name.getData()?has_content> 
8    <#assign  
9        parent = DLAppService.getFolder(groupId,0,Parent_folder_name.getData())  
10        parentId = parent.getFolderId() 
11    /> 
12     
13    <#if parent?has_content> 
14        <#assign  
15            parentId = parent.getFolderId() 
16        /> 
17    </#if> 
18</#if> 
19 
20<#assign  
21    url = request.attributes['CURRENT_URL']  
22    folderId = getterUtil.getLong(httpUtil.getParameter(url, "folderId", false)) 
23    firstFolder = DLAppService.getFolder(groupId,parentId,foldername.getData()) 
24     
25    indexOfParam = url?index_of("#")-1 
26    isInParent = false 
27/> 
28 
29<#if 0 < indexOfParam> 
30    <#assign  
31        url = url[0..indexOfParam] 
32    /> 
33</#if> 
34 
35<#assign  
36    indexOfParam = url?index_of("?")-1 
37/> 
38 
39<#if 0 < indexOfParam> 
40    <#assign  
41        url = url[0..indexOfParam] 
42    /> 
43</#if> 
44 
45<#if 0 < folderId> 
46    <#assign  
47        folder = DLAppService.getFolder(getterUtil.getLong(folderId)) 
48        subFolderName = " / " + folder.getName() 
49    /> 
50     
51    <#if folder.getParentFolderId() != firstFolder.getFolderId()> 
52        <#list 1..100 as x> 
53          <#assign  
54            folderParent = DLAppService.getFolder(folder.getParentFolderId()) 
55            subFolderName = " / <a href='" + url + "?folderId=" + folderParent.getFolderId() +"#"+folderParent.getFolderId()+"'>" + folderParent.getName() + "</a>" + subFolderName 
56          /> 
57           
58          <#if folderParent.getParentFolderId() == firstFolder.getFolderId()> 
59            <#assign  
60                isInParent = true 
61            /> 
62            <#break> 
63          </#if> 
64        </#list> 
65         
66        <#if isInParent = false> 
67            <#assign  
68                folder = DLAppService.getFolder(groupId,parentId,foldername.getData()) 
69                subFolderName = "" 
70            /> 
71        </#if> 
72    </#if> 
73<#else> 
74    <#assign  
75        folder = DLAppService.getFolder(groupId,parentId,foldername.getData()) 
76        subFolderName = "" 
77    /> 
78</#if> 
79 
80 
81<style> 
82    div.gallery { 
83        margin: 5px; 
84        border: 1px solid #ccc; 
85        float: left; 
86        width: 180px; 
87
88     
89    div.gallery:hover { 
90        border: 1px solid #777; 
91
92     
93    div.gallery img { 
94        width: 100%; 
95        height: auto; 
96
97     
98    div.desc { 
99        padding: 15px; 
100        text-align: center; 
101
102</style> 
103 
104<div class="section "> 
105<div class="section_wrapper clearfix"> 
106<div class="items_group clearfix"> 
107<div class="column mcb-column one column_tabs"> 
108<div class="desc_wrapper"> 
109<p>&nbsp;</p> 
110 
111 
112<#if folder?has_content> 
113    <p id="${folder.getFolderId()}" ><strong><span style="font-size:24px;"><a href="${url}#${folder.getFolderId()}">${Title.getData()}</a>${subFolderName}</span></strong></p> 
114 
115    <p>${Description.getData()}</p> 
116 
117    <#if folder.getDescription()?has_content> 
118        <p>${folder.getDescription()}</p> 
119    </#if> 
120 
121    <#assign  
122        subFolders = DLFolderLocalService.getFolders(groupId,getterUtil.getLong(folder.getFolderId()),true) 
123    /> 
124     
125    <#list subFolders as subFolder> 
126        <#assign  
127            subImages = DLAppService.getFileEntries(getterUtil.getLong(subFolder.getRepositoryId()),getterUtil.getLong(subFolder.getFolderId())) 
128        /> 
129        <#if subImages[0]?has_content> 
130            <div class="gallery"> 
131              <a href="${url}?folderId=${subFolder.getFolderId()}#${subFolder.getFolderId()}"> 
132                <img class="picture" src="/documents/${subImages[0].getRepositoryId()}/${subImages[0].getFolderId()}/${subImages[0].getTitle()}?imageThumbnail=2" alt="${subImages[0].getDescription()}" />  
133              </a> 
134              <div class="desc"><a href="${url}?folderId=${subFolder.getFolderId()}">${subFolder.getName()}</a></div> 
135            </div> 
136        </#if> 
137    </#list> 
138     
139    <hr /> 
140 
141    <#assign  
142        images = DLAppService.getFileEntries(getterUtil.getLong(folder.getRepositoryId()),getterUtil.getLong(folder.getFolderId())) 
143    /> 
144    <#list images as image> 
145        <div class="gallery"> 
146          <a class="myGallery" data-gall="gall1" data-title="${image.getDescription()}" href="/documents/${image.getRepositoryId()}/${image.getFolderId()}/${image.getTitle()}?imageThumbnail=3" title="${image.getDescription()}"> 
147            <img class="picture" src="/documents/${image.getRepositoryId()}/${image.getFolderId()}/${image.getTitle()}?imageThumbnail=2" alt="${image.getDescription()}" />  
148          </a> 
149          
150        </div> 
151    </#list> 
152</#if> 
153 
154</div> 
155</div> 
156</div> 
157</div> 
158</div>