89 Community Blogs: Sample Blog Pages

This chapter provides information about the default blog components that are supplied by the Community Blogs module. These ready-to-use components render the sample blog pages.

This chapter contains the following sections:

89.1 Overview of the Sample Blog Pages

Blog pages are composed of blog assets, blog author assets, a right navigation panel, a header, and a footer. Blog pages are rendered by default blog templates, CSElements, and a SiteEntry asset (as shown in Figure 89-1). By default, all blog pages are cached (except the wrapper page).

The FW_RecentBlogs page is the Community Blogs module's main page. It is called by the FW_RecentBlogsDetail template.

The wrapper element calls the sample layout template (FW_BlogLayout). The layout defines the overall appearance of the sample blog pages and calls the FW_BlogContainer template, which then calls the corresponding detail templates for the page, and for the asset types Blog Category and Blog Asset.

The wrapper's parameters (including the number of blogs that can appear on a page at one time) are defined by the default SiteEntry asset. The Community Blogs module's SiteEntry asset is rendered by the FW_Blogwrapper CSElement.

Figure 89-1 Sample Home Page

Description of Figure 89-1 follows
Description of "Figure 89-1 Sample Home Page"

89.2 Components of the Sample Blog Pages

This section provides information about the default blog templates, CSElements, and SiteEntry asset. These components are pre-configured with default parameters and code which render the sample blog pages.

WebCenter Sites renders the sample blog pages by executing the code associated with the sample page names. You can use the sample blog pages as a reference to create your own blog pages that will conform to the look and feel of your own website.

Note:

Page assets cannot be shared between sites. If you wish to use the Community Blogs module on a different CM site, you must create new blog pages for those sites. All other components can be shared. If you wish to completely customize blog functionality on your sites, you can add the necessary blog code to your own site's components, and reconfigure them to fit your requirements. For instructions on creating pages, see Section 90.2.1, "Creating Blog Pages" in Chapter 90, "Community Blogs: Customizing Blog Components."

The sample blog pages can be found in the WebCenter Sites tree (select Site Plan tab and then Unplaced Pages ). The sample pages are described below:

  • FW_RecentBlogs: This page is the sample home page for the Community Blogs module and displays all recently published blogs.

  • FW_AuthorBlogs: This page displays the blogs posted by a selected author. The blogs are rendered when you click the author's name in the Authors section of the right navigation panel.

  • FW_ArchiveBlogs: This page displays all the blogs that have been posted in a given month. The blogs are rendered on this page when you click the month's name in the Archive section of the right navigation panel.

These pages are rendered by the FW_BlogLayout template. However, to navigate through the pages, start from the sample home page (FW_RecentBlogs), because this page initializes the parameters that are required for the other sample blog pages.

For information about the components of the sample blog pages, see the following topics:

89.2.1 Default Blog CSElements

The Community Blogs module provides you with default CSElements, which store reusable code (in the form of XML or JSP and Java) that build the sample blog pages. For example, since the Share link is displayed on all three sample blog pages, a CSElement was created for it (FW_Blogs/Utils/AddThisWidget) which contains the full code for the link's functionality.

Table 89-1 lists and describes the Community Blogs module's default CSElements.

Table 89-1 Default Blog CSElements

Name and ElementCatalog Entry Description

FW_BlogWrapper

The wrapper for the Community Blogs module's sample pages.

FW_Blogs/Utils/AddThisWidget

Renders the Share link, which enables visitors to share blogs between websites.

FW_Blogs/Utils/CreateArchiveLink

Renders a link that calls the FW_ArchiveBlogs template.

FW_Blogs/Utils/CreateAuthorLink

Renders a link that calls the FW_AuthorBlogsDetail template.

FW_Blogs/Utils/GetAssetData

Retrieves the data for the blog asset. For example, this element can retrieve the attributes the blog asset inherits from its parent.

FW_Blogs/Utils/GetAuthor

Retrieves the full name and profile image of a given blog's author from that author's author asset (if any).

FW_Blogs/Utils/GetBlogAuthors

Retrieves the list of authors, and provides links to each author.

FW_Blogs/Utils/GetBlogCategories

Retrieves the list of categories, and provides links to each category.

FW_Blogs/Utils/GetBlogsByMonth

Retrieves the list of months, and provides links to each month.

FW_Blogs/Utils/GetChildren

Retrieves the children for a particular blog parent.

FW_Blogs/Utils/GetExternalURL

Creates the external URLs of the blog assets whose titles and summaries are listed in the RSS Feed. By default, this element creates the local WebCenter Sites URL. To modify the URL you must customize this element, see Section 90.3, "Customizing URLs for the RSS Feed."

FW_Blogs/Utils/GetRecentBlogs

Retrieves the list of recently published blogs, and provides links to their detail pages.


89.2.2 Default Blog SiteEntry Asset

The Community Blogs module's SiteEntry asset represents a pagelet and is associated with the FW_Wrapper CSElement, which is the root element that generates the sample pages' wrapper. The Community Blogs module's SiteEntry asset specifies the blogsperpage pagelet parameter, which defines the number of blogs that can be displayed on a page at one time.

Table 89-2 lists the default pagelet parameters for the FW_BlogWrapper SiteEntry asset.

Table 89-2 FW_BlogWrapper SiteEntry Asset Pagelet Parameters

Pagelet Parameter Value

blogsperpage

5

rendermode

live

seid

This value is auto-generated.

site

The name of the site on which you installed the Community Blogs module.


The Number of Blogs Per Page

The number of blogs per page is passed as the parameter blogsperpage from the FW_BlogWrapper SiteEntry asset. If nothing is passed, the default value of 10 is used to specify the number of blogs per page. For instructions on specifying the number of blogs that can be displayed at one time on your site's blog pages, see Section 90.2.4, "Adding Blog Parameters to Your Site's SiteEntry Asset."

89.2.3 Default Blog Templates

The Community Blogs module supplies you with default templates that render the sample blog pages. When a link is clicked, the corresponding template is called to render the content. For example, if you click the More link for a given blog post, the associated detail template renders the post's full content.

The page layout of your site is rendered by your own headers, footers, navigation, and content containers. To add blog pages to your website, you can add the necessary code specified in the Community Blogs module's default templates to your site's templates. Table 89-3 lists and provides information about the Community Blogs module's default templates.

Table 89-3 Default Blog Templates

Template Default Name Asset Type Description

Detail

FW_ArchiveBlogsDetail

Page

Used to render the blogs listed in the Blogs Archive page.

Detail

FW_AuthorBlogsDetail

Page

Used to render the blogs listed under the Blogs By Author page.

Detail

FW_BlogAssetDetail

FW_BlogAsset

Used to render the full content of a selected blog.

Detail

FW_BlogCategoryDetail

FW_BlogParent

Used to render the blog categories listed under the Categories section of the right navigation panel.

Detail

FW_RecentBlogsDetail

Page

Used to render the blog home page which lists all recently published blogs.

Container

FW_BlogContainer

Page

Used to call the detail templates.

Container

FW_BlogContainer

FW_BlogParent

Used to call the detail templates.

Container

FW_BlogContainer

FW_BlogAsset

Used to call the detail templates.

Blog Layout

FW_BlogLayout

N/A

Used to render the main layout of the sample blog pages.

Blog RSS

FW_BlogRSS

N/A

(Typeless) Used to render the FW_BlogSummaryRSS.

Blog RSS

FW_BlogSummaryRSS

FW_BlogAsset

(Typed) Renders the RSS feed on a Web page. Called by FW_BlogRSS.

Summary

FW_BlogSummary

FW_BlogAsset

Used to list the summaries of each blog asset. The summary of a blog asset includes the title, abstract, author's full name and profile image, date, and time.

Link

FW_Link

FW_BlogParent

Used to render the blog category links.

Link

FW_Link

FW_BlogAsset

Used to render the blog links.

Navigation

FW_Nav

FW_BlogParent

For each detail template there is a navigation link which internally calls all the elements (Recent Posts, Categories, Authors, and Archive).

Navigation

FW_Nav

FW_BlogAsset

For each detail template there is a navigation link which internally calls all the elements (Recent Posts, Categories, Authors, and Archive).

Navigation

FW_Nav

N/A

For each detail template there is a navigation link which internally calls all the elements (Recent Posts, Categories, Authors, and Archive).

Navigation

FW_Nav

Page

For each detail template there is a navigation link which internally calls all the elements (Recent Posts, Categories, Authors, and Archive).


89.2.4 Blog Archive More Link Functionality

The More link, located next to the Archive section in the right navigation panel, is used to fetch additional data associated with the Archive page. By default, the Archive page lists the last 12 months of blogs. Clicking the More link multiple times retrieves another 12 months of blog data for every click.

Description of blog_more_link.png follows
Description of the illustration blog_more_link.png

The More link is coded in the Community Blogs module's default layout template. For more information about the layout template's code, see Section 90.2.2, "Adding Blog Code" in Chapter 90, "Community Blogs: Customizing Blog Components."

89.3 Next Steps

So far this section of the guide has provided information about the Blog flex family and the default components that make up the sample blog pages. The rest of the chapters are procedural. For developers, Chapter 90, "Community Blogs: Customizing Blog Components" contains procedures and code for adding blog functionality to custom pages. For administrators, the Oracle Fusion Middleware WebCenter Sites Administrator's Guide contains instructions on enabling blog asset types for the content providers. The Oracle Fusion Middleware WebCenter Sites User's Guide provides information on testing the data model and creating blog assets for publication.