It just takes 15 seconds. Send your
details and we’ll get back to you soon.

Integrating Grails with Weceem

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

Similar Posts:


Posted in CMS, Grails, Groovy | Tagged , , , , , .

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. Pingback: Questa settimana in Grails (2012-16) - luca-canducci.com - Il blog di Luca Canducci: notizie, tips e nuove tecnologie dal mondo dell’IT.

  3. Pingback: An Army of Solipsists » Blog Archive » This Week in Grails (2012-16)

  4. 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)

  5. Ni'ma Rayan says:

    I have a very strange error, I finished my project, made the .war file, but when I put it in the Tomcat_HOME/webapps folder, and it also deploys, but it’s not showing up in the browser, instead it gives me the 404 error: The requested resource is not available.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Archives

Get Our Latest Updates. Subscribe Now

Categories