Integrating Grails with Weceem « Intelligrape Groovy & Grails Blogs

Integrating Grails with Weceem

Posted by

Today, I’ll be talking on how to go about integrating the Weceem CMS into a grails-app. It is extremely simple and with a couple of steps you would have a CMS that can render traditional as well as custom content merged into your grails application.

Ok … First things first … What is Weceem ?

Weceem (as in ‘We seem’ to like it :D ) is a Content Management System developed by Marc Palmer for JCatalog that is built on Grails. It is open source and easy to use.  Apart from being customizable, the other thing that I liked about it was the ability to create custom content, and that too using grails conventions!!.

While it supports traditional content like Blogs, Wiki articles etc, one had the flexibility and support of creating a custom content that might be more in line with the hosting grails app. Add to that the ease of a grails plugin that makes it’s integration with an existing grails app a breeze.

Getting back to Installation …..

To install weceem simply type

grails install-plugin weceem

While installing, it will pull a whole lotta stuff as it’s dependencies (searchable, blueprint , ckeditor etc).

Next to see the plugin’s CMS page, one needs to configure a couple of properties.

1)   In your Config.groovy change the follwing line to false ….

grails.mime.file.extensions = false //set to true by default

2)  Next if you need content to be served from the root URI (‘/’) of your application, simply remove the default grails URL mapping for ‘/’ URLMappings.groovy.i.e doing this will cause the app home page to change to the CMS home page.

Thats all you need to have Weceem up and running.

Simply hit ‘grails run-app’ and depending on your implementation of Step 2 above either hit ‘/’ or ‘wcmContent/show’ and VOILA!!!, you end up on the landing page of the CMS. Click on the ‘edit content repository’ link to go to the Content Repository that looks something like the image below…

Weceem CMS landing page

Weceem CMS landing page

You have a grails powered CMS integrated into your app in matter of minutes. Click on the new content link button, and you are presented with a range of content options … from HTML to Blogs to Wiki pages and so on.

Great … Lets create some content …

First select existing Blog folder in the CMS dashboard  and then click on  the ‘New Content’ -> Blog Entry ..

Add some content …

Thats it … All you gotta do now is hit save.

Now to view our content … Go to the blogs page of your app (URI for page is defined in ‘Alias uri’ section of Blogs folder-edit page.. Default is ‘blog’) or “http://<serverURL>/blog”

Tip : To serve all content through a specific URI prefix .. just add

weceem.content.prefix = 'content' // replace 'content' with anything you prefer ... 

to make your blogs page and all other repository content be served from  http://<serverURL>/content/<blog_or_anything_else>

In the next blog, I’ll talk how to go about creating your own custom content ..

Till then … peace out .. :)

Manoj Mohan
manoj(at)intelligrape(dot)com
This entry was posted on April 16th, 2012 at 4:24 pm and is filed under CMS, Grails, Groovy . You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

5 Responses to “Integrating Grails with Weceem”

  1. Philippe says:

    Great ! I’ve been looking into it for a while but was always bumping into issues I had no time to look into at that time. I’ll give it a new try.

    Thanks !

    Philippe

  2. krishna says:

    i always get the below error in STS spring tool suite.

    log4j:ERROR Error initializing log4j: jline/Terminal
    java.lang.NoClassDefFoundError: jline/Terminal
    at org.codehaus.groovy.grails.plugins.log4j.appenders.GrailsConsoleAppender.(GrailsConsoleAppender.java:45)

  3. Hello there, I discovered your site by means of Google even as searching for a comparable subject, your site came up,
    it seems great. I have bookmarked it in my google bookmarks.

    Hi there, just changed into aware of your blog thru Google, and found that it’s really informative. I am gonna be careful for brussels. I will appreciate for those who continue this in future. Lots of folks can be benefited from your writing. Cheers!

Leave a Reply