Building a Fully Functional Blog with eXo Platform – Part 1

eXo Platform is a perfect runtime for content-based applications. It is very easy to create flexible data structures, add forms and display them. The built-in Content Management System contains all the constructs you need to speed up your app development.

In this series of posts, we will demonstrate how to use eXo Platform capabilities to add a blog to your social intranet.

Use Case

There are multiple ways to build a blog system, public/private, multi-user vs single, etc. Here, the goal is not to build a generic blog management system that would fit any /all requirements, but rather to focus on a single use case. For the purposes of this tutorial, we used requirements from our recent project to establish an internal blog at eXo – a blog for employees to share internally what they do, what they like. We are a global company, with eXoers all around the world. Since we are using the social intranet from eXo Platform 3.5, the new blog will be a simple system open to all intranet users.

Getting Started

eXo Platform really shines when it comes to live development. So you could very well – as we did initially – build this blog system entirely from the UI. We added pages with the portal UI, created the data structure in the ECM Admin and coded all the templates in the embedded IDE. Everything live, without a single server restart.

However, to make it easier to reuse and share with you, we finally ended up creating an installable extension. To learn more about how to create a new extension, please see our eXo Platform Developer Guide.

Any code or config shown below can be found in this Git repository:


The very first step is to to define a set of pages.

/blog: the blog homepage, where post excerpts are listed
/blog/add: the form where users can quickly add a new post
/blog/admin: the blog back office where posts are managed
/blog/article: the page where each complete article is displayed

Let’s start with the navigation.xml:

Quite easy, right ? Two things to note: page-references explicitly refers to intranet portal, as our extension sits on top of it. Also note the HIDDEN visibility, which will be interpreted by not generating a menu entry on the frontend (portal admins have the ability to edit them of course).

Let’s see how it goes. Login as an admin, then Edit > Site > Navigation. You should see the new navigation:

Blog Navigations


Next, we need to point the navigation to real pages.

/admin will use the Content Explorer (aka File Explorer Portlet)
/article will use the Content Detail (aka Single Content Viewer)
/blog will use the Content List (aka Content List Viewer)
/add will use the Fast Content Creator

Here’s an excerpt of the pages.xml:

That’s it. We now have the page structure for our blog system. Login as any user, and you should see the Blog menu and try the URLs.

Blog Menu

Now, to get something functional we need to invite WCM to the party. Since any user can be a potential blogger, we’ll store the blog posts in a location that is available to all: /Users/platform/users/Documents. The CLV (Content List Viewer) can then be configured accordingly:

We need to tell the CLV to display the /blog/article page when we click on one of the items in the list:

And of course, the quickpost form should also point there:

Finally, let’s tell the Content Explorer to use the Users drive so that it will display our posts:

That’s it. We now have a rudimentary yet fully functional blog system.

Give it a try: log in as admin and go to http://localhost:8080/portal/intranet/blog/add.

Next, save, then go to http://localhost:8080/portal/intranet/blog/admin to publish your post. Check http://localhost:8080/portal/intranet/blog to make sure your post appears:

Blog Backoffice

Finally, click on the post title to verify that your article displays under http://localhost:8080/blog/article.

Blog Article


We’ve demonstrated how to build a rudimentary blog system in minutes, using the powerful portal and content management constructs that come with eXo Platform 3.5. In part 2 we’ll add a little more coolness to the blog, by making it easy for even non-technical employees to use.


Be part of the discussion, share your comments