All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.blogs.view_entry.jsp Maven / Gradle / Ivy

There is a newer version: 2.0.2
Show newest version
<%--
/**
 * 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.
 */
--%>

<%@ include file="/blogs/init.jsp" %>



<%
BlogsEntry entry = (BlogsEntry)request.getAttribute(WebKeys.BLOGS_ENTRY);

long entryId = BeanParamUtil.getLong(entry, request, "entryId");

AssetEntry assetEntry = AssetEntryLocalServiceUtil.getEntry(BlogsEntry.class.getName(), entry.getEntryId());

AssetEntryServiceUtil.incrementViewCounter(BlogsEntry.class.getName(), entry.getEntryId());

AssetUtil.addLayoutTags(request, AssetTagLocalServiceUtil.getTags(BlogsEntry.class.getName(), entry.getEntryId()));

request.setAttribute(WebKeys.LAYOUT_ASSET_ENTRY, assetEntry);

request.setAttribute("view_entry_content.jsp-entry", entry);

request.setAttribute("view_entry_content.jsp-assetEntry", assetEntry);
%>




	
	

	


<% BlogsEntry[] prevAndNext = BlogsEntryLocalServiceUtil.getEntriesPrevAndNext(entryId); BlogsEntry previousEntry = prevAndNext[0]; BlogsEntry nextEntry = prevAndNext[2]; %>

<% String smallImageURL = previousEntry.getSmallImageURL(themeDisplay); %>

<%= previousEntry.getTitle() %>

<%= StringUtil.shorten(HtmlUtil.stripHtml(previousEntry.getContent()), 100) %>

<% String smallImageURL = nextEntry.getSmallImageURL(themeDisplay); %>

<%= nextEntry.getTitle() %>

<%= StringUtil.shorten(HtmlUtil.stripHtml(nextEntry.getContent()), 100) %>

<% Discussion discussion = CommentManagerUtil.getDiscussion(user.getUserId(), scopeGroupId, BlogsEntry.class.getName(), entry.getEntryId(), new ServiceContextFunction(request)); %>

<% PortalUtil.setPageTitle(entry.getTitle(), request); PortalUtil.setPageSubtitle(entry.getSubtitle(), request); PortalUtil.setPageDescription(entry.getDescription(), request); List assetTags = AssetTagLocalServiceUtil.getTags(BlogsEntry.class.getName(), entry.getEntryId()); PortalUtil.setPageKeywords(ListUtil.toString(assetTags, AssetTag.NAME_ACCESSOR), request); PortalUtil.addPortletBreadcrumbEntry(request, entry.getTitle(), currentURL); %>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy