Using MeshCMS To Manage a Blog

MeshCMS has been thought to manage websites, not blogs, but I really wanted to start a blog within my site, so I created a Blog module that is currently available on SVN. Let's make clear that if you want to get a blog, MeshCMS is not the best tool around, but in situations similar to mine, where the blog is just a part of the whole, it might come handy to be able to use a single tool for all things.

The blog module is really easy to use: just create a new page and insert the blog module into it. Articles must be subpages of that page, and it is recommended to hide the submenu for the main blog page (you can do that with the Page Manager).

You can add the Comments module in the theme as a fixed module, so you don't need to insert it into each article you write. Alternatively, you can do that for each page, so you get fine-grained control about which pages should be opened to comments.

Page keywords (declared using the standard <meta name="keywords" content="..." />) are used as tags. I will add a tag list module soon to allow to navigate the blog using tags. I will also add a simple calendar module, to select articles by date, and a RSS feed feature.

Modules to insert image galleries, audio and video are already available, and if you insert images using TinyMCE, MeshCMS is able to rescale them on the fly so you don't need to create multiple versions of those images. To see this feature in action, look at an example in an article from the Italian version of my blog. I've also added a small jQuery script that adds a link to the original image! Here's the code:

$(function() {
  var pattern = new RegExp("generated(.*?)/org.meshcms.core.ResizedThumbnail");

  $("img").each(function() {
    var img = $(this);

    if (!img.parents("a").size()) {
      var result = pattern.exec(img.attr("src"));

      if (result) {
        img.wrap('<a href="' + result[1] + '"></a>');

It is fun to see how easy it was to start a simple blog using MeshCMS!

Ahmed Mohombe

Nov 14, 2007 12:09 PM

IMHO it's a very good idea that you started a blog :).

I know that this isn't supposed to be a full blown blog, but there are a few small features that would make it more usable:

- Tags/categories - this is usefull (even on your site - e.g. to label the posts that are specific to MeshCMS or other themes)

- "Archieve" - the calendar with the posts (at specific dates). This could be done with the inline usage of the JSCaledar, with links to the cells (AFAIK there are examples on the net how to use JSCaldar for more than just date selection)


Nov 14, 2007 12:24 PM

In fact those are the enhancements I listed in the article. Tags are already availalble in the blog index, but not in the article. For the archive, I was thinking of something simpler: a module that displays a <select> tag with months and years.

Another feature I'd like to add is RSS. The issue here is that it can't be a module, since we need a URL to call. I'll probably use something like /meshcms/admin/rss.jsp?path=/en/blog. Then I need to find a way for the module to inject the needed tag in the <head>.

Ahmed Mohombe

Nov 14, 2007 12:36 PM

> Tags are already availalble in the blog index

But they are not click-able :).

The point of tags is that on clicks on them and a list with all posts that contain that tag is displayed (sorted by date).

Also the date is important to be displayed in the detail too.

The "select" approach is not very nice (it's implemented in many blogs these days). Another option instead of JSCalendar would be to use JQuery - AFAIK it has some very nice plug-ins for such operations.


Apr 19, 2008 9:12 AM

Not sure if it's just me - in the blog layout, the content text is show in a very narrow column in the middle, with the left and right panel being taken by navigation and bog tools. Maybe the right hand panel can be moved to the left side so that you can get more room for the blog content?

Anyway, meshcms looks like the system I need. Good work!

Comments are closed.