
META-INF.resources.blogs.view_entries.jspf Maven / Gradle / Ivy
<%--
/**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
--%>
<%
Map contextObjects = new HashMap();
contextObjects.put("blogsPortletInstanceConfiguration", blogsPortletInstanceConfiguration);
contextObjects.put("blogsPortletInstanceSettingsHelper", blogsPortletInstanceSettingsHelper);
%>
<%
int index = 0;
for (Object result : results) {
BlogsEntry entry = null;
AssetEntry assetEntry = null;
if (result instanceof AssetEntry) {
assetEntry = (AssetEntry)result;
entry = BlogsEntryLocalServiceUtil.getEntry(assetEntry.getClassPK());
AssetUtil.addLayoutTags(request, assetEntry.getTags());
}
else {
entry = (BlogsEntry)result;
}
index++;
request.setAttribute("view_entry_content.jsp-searchContainer", searchContainer);
request.setAttribute("view_entry_content.jsp-entry", entry);
request.setAttribute("view_entry_content.jsp-assetEntry", assetEntry);
%>
<%
}
%>
<%!
private List _convertToBlogEntries(List results) throws PortalException, SystemException {
if (results.isEmpty() || (results.get(0) instanceof BlogsEntry)) {
return results;
}
List entries = new ArrayList(results.size());
for (Object result : results) {
AssetEntry assetEntry = (AssetEntry)result;
BlogsEntry entry = BlogsEntryLocalServiceUtil.getEntry(assetEntry.getClassPK());
entries.add(entry);
}
return entries;
}
%>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy