JBoss Community Archive (Read Only)

GateIn WCM

3. Composing content portal pages

GateIn WCM offers two portlets applications: WCM Editor and WCM Content.

WCM Editor was covered in chapter 2 as a main UI for authoring and managing content in the GateIn WCM repository.

This chapter will describe WCM Content portlet as a way to compose portal pages with portlets that can render content previously created in WCM Editor.

WCM Content portlet has not specific requeriments, it is a standard portlet that can be used in combination with other applications to compose a rich portal page under GateIn Portal context.

This chapter assumes that reader knows GateIn Portal terminology about how to build portal pages, please, check How to create pages in GateIn Portal to review these concepts if needed.

WCM Content portlet is responsible to combine content (posts, categories and uploads) with templates to render a WCM output.

images/author/download/attachments/75137362/wcm-3-1.png

This point is focus in the use and configuration of WCM Content portlet, Templates design will be cover in detail in next chapter 4.

3.1 Adding WCM portlets into a page

New WCM Content portlets can be added to a portal page through Page Editor UI:

images/author/download/attachments/75137362/wcm-3.1-1.png

This portlet has not specific layout requeriments, it can work in a single page or in combination with other portlets and containers:

images/author/download/attachments/75137362/wcm-3.1-2.png

Users inside /wcm group have rights to access into WCM application category to use WCM Content in page composition:

images/author/download/attachments/75137362/wcm-3.1-3.png

3.2 Configuring WCM Content portlet

Once a WCM Content portlet is hosted in a portal page, next step is to configure it accessing under standard "Edit Portlet" link.

Configuration will address two main topics:

  • Which templates will be used inside WCM Content portlet.

  • Which content (categories or posts) will be combined inside templates.

images/author/download/attachments/75137362/wcm-3.2-1.png

There is an additional option in the configuration called Locale Relationships.
This option activates the automatic resolution of templates and content aligned with locale of the request.
That means that WCM Content checks that content is used has same locale that user is using trying to find a relationship to satisfy or showing default one if no relationship is found.

3.2.1 Main template

WCM Content uses Main template as default option to render content in combination with content defined in the configuration.

For example, this page renders a page with a single WCM Content portlet:

images/author/download/attachments/75137362/wcm-3.2.1-1.png

With the following configuration:

images/author/download/attachments/75137362/wcm-3.2.1-3.png images/author/download/attachments/75137362/wcm-3.2.1-2.png

We can see that in the example portlet is using Concert Template with categories: Concert, Theatre, Sporting and Metro.

Template is responsible to take posts and uploads and rendered in the way it's defined inside template.

A template takes posts and uploads related to a category and shows them like a list, as it is shown in the example (how template renders content will be covered in next chapter).

Once your template is rendered a next step is to browse per posts or even per categories.

That is the goal of the two following templates: Post template and Category template.

3.2.2 Post template

This template is used by WCM Content to render a specific post passed as parameter.

For example, the previous configuration used following Post template:

images/author/download/attachments/75137362/wcm-3.2.2-1.png

GateIn WCM uses Public GateIn API to identify whether the page URL defines a post id like

http://localhost:8080/portal/classic/magazine/concert/post/id/367

In this example /post/id/367 is a suffix that WCM Content detects to use the Post template with the post defined with id.

3.2.3 Category template

Also is possible to browse per categories using Category template.

For example, we can browse per "Top Events" tag:

images/author/download/attachments/75137362/wcm-3.2.3-1.png

GateIn WCM uses Public GateIn API to identify whether the page URL defines a category id like

http://localhost:8080/portal/classic/magazine/concert/cat/id/488

In this example /cat/id/488 is a suffix that WCM Content detects to use the Category template with the category defined with id.

3.3 In-line post editing

One important features of GateIn WCM is in-line editing.

Post templates allows to enter in in-line edition mode once user is logged into GateIn and it has rights to write on that post.

Main templates or Category template doesn't not support in-line editing.

For example, once user is logged into GateIn Portal and access to a post:

images/author/download/attachments/75137362/wcm-3.3-1.png

He can activate in-line editing mode using edit icon images/author/download/attachments/75137362/wcm-3.3-2.png on the top-right corner.

images/author/download/attachments/75137362/wcm-3.3-3.png

In in-line editing mode, post fields are activated with a floating Rich Editor allowing user to make changes.

Post is saved automatically when user loses focus from the editable field.

JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-10 13:41:38 UTC, last content change 2013-11-06 14:21:31 UTC.