The Blog module allows you to add a blog to your website. The module is integrated with the Standard Templating Kit and includes all features typically found in blogs. A sample blog is available at demo-features/special-templates/blog. In a multisite environment you can add a blog to each site in the page tree.

STK Templates

Pages

The module adds two page templates in STK > Template Definitions /pages:

  • stkBlog: Blog home or main page that aggregates content from blog posts in a site tree.
  • stkBlogEntry: Blog post page.

Both templates disable the promos and breadcrumb areas, giving the pages a blog look.

The stkBlog template is a standard STK feature page template that autogenerates the stkBlog component in content area. This component renders a teaser list of blog posts, i.e. pages based on the stkBlogEntry template.

The stkBlogEntry template extends the stkArticle template. It is a standard article template with the sectionHeader area and vertical navigation disabled. The blog-entry subcategory property is used by the stkBlog component to aggregate pages based on this template.

Here's the template definition in STK > Template Definitions /pages/stkBlogEntry.

Node nameValue

   pages

 

 stkBlogEntry

 

 areas

 

 navigation

 

 vertical

 

 enabled

false

 dialog

standard-templating-kit:pages/blogEntry/stkBlogEntryProperties

 extends

/modules/standard-templating-kit/templates/pages/stkArticle

 i18nBasename

info.magnolia.module.blog.messages

 subcategory

blog-entry

 title

templates.stkBlogEntry.title

Components

The module adds two components to the STK:

  • stkBlog: Aggregates teasers to all blog posts in a site tree, with the latest first. Pagination is available and editors can define the number of entries per page. The component is autogenerated on the stkBlog template.
  • stkBlogEntryList: Extras component that aggregates latest blog posts. Editors can select a parent page and define the number of teasers. The component is made available on all templates in the template prototype in STK > Site Definitions/default/templates/prototype/areas/extras/areas/extras1&2/availableComponents.

The component definitions are configured in STK > Template Definitions /components/features/stkBlog and /extras/stkBlogEntryList and are very similar

Here's the configuration of the stkBlog component.

Node nameValue

   components

 

   features

 

 stkBlog

 

 parameters

 

 divClass

teaser-latest

 divIDPrefix

teaser

 headingLevel

h2

 searchForSubcategory

blog-entry

 teaserLinkType

 internal

 description

components.features.stkBlog.description

 dialog

standard-templating-kit:components/features/stkBlog

 i18nBasename

info.magnolia.module.blog.messages

 modelClass

 info.magnolia.module.blog.components.BlogModel

 renderType

stk

 templateScript

/blog/components/blog.ftl 

 title

components.features.stkBlog.title

Template availability

The page templates are made available in STK > Site Definitions /default/templates/availability/templates/stkBlog and /stkBlogEntry. See Site definition for more.

Node nameValue

 default

 

 templates

 

 prototype

 

 availability

 

 templates

 

 stkHome

 

                               ....

 

 stkBlog

 

 stkBlogEntry

 

Tagging content

You can tag blog content using categories stored in the Categories app.

Adding categories to posts

Categorization is available in the Page Header component in the stkBlogEntry template. The intro area uses the stkBlogEntryHeader dialog configured in STK > Dialog Definitions /pages/blogEntyr/stkBlogEntryHeader. This dialog includes the generic tabCategoriztion tab by extension. See Dialog definitions and Categories in the STK for more information about how to tag content.

 Add Category Cloud components to the blog templates to render tag clouds on your blog pages. See Making components available for more.

Categories app

The Categories app includes sample blog tags. These are bootstrapped on installation and you can add your own. See Creating categories for more.

Commenting

The Comments component is available on the stkBlogEntry template. See Commenting module for more.

 

Add the Latest Comments component to extras area to render comments from related pages. See Adding components to templates for more.

Comments are stored and moderated in the Forum app. See Forum app in the Commenting module documentation for more.

#trackbackRdf ($trackbackUtils.getContentIdentifier($page) $page.title $trackbackUtils.getPingUrl($page))
  • No labels