PDA

View Full Version : Custom Themes?



vithun
May 5th, 2011, 04:14 AM
Hello. I am quite new to Grails (started using it for just about a month now) and am really enjoying the experience as it quickens up a lot of effort, especially coming from a Java background.

I am currently working on a web application that creates instances of sites (like Blogger). We are using the multi-tenancy plugin for this.

We want the admin of each site to be able to customize the look-and-feel of the site, probably by uploading a template file (again, something like Blogger). If someone could suggest a good way of going about accomplishing this task, it would be highly appreciated.

Is there any plugin/example of something similar to this?

vithun
May 5th, 2011, 05:44 AM
I'm reading the chapter on Views in the Grails in Action book and I think I'm getting an idea of how to do this. I'll post back about my progress. Meanwhile if anyone can suggest some good pointers which might help, I do welcome it. Thanks.

pledbrook
May 9th, 2011, 06:15 AM
You might want to consider asking this on the Grails user mailing list (http://grails.org/Mailing+lists). It may be tricky to do this with layouts - you would need a good understanding of how SiteMesh works to get it to pull layouts from a database. That's if it's even possible.

It might be easier to use straightforward views for the custom layouts, with each view using <g:include/> to include the relevant page.

vithun
May 9th, 2011, 06:23 AM
Thank you Peter. Even I thought of a similar solution (using <g:include>) and have almost completed implementing the solution. I intend to share it in a blog post soon once I have completed.