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