Many posts are already appeared about integrating radiant and rails distinct apps, anyway here my needs are simpler: run them in parallel and call the radiant layout ( snippets, layouts and pages ) from the other rails app embedding the radiant views components. What is the better way to go ? For what I've understood about Creating_an_extension_VI tutorial, the share_layouts extension is installed inside "Radiant app" and permits to call radiant_layout 'Normal' within the new extention controller, which means to me, "not outside radiant". Is that possible calling the radiant_layout from an external rails app? Are there other plugins to have a look ? I've also thought to dump the layout on the file system via "file_system_extension" that produce a ~/radiant_app/design/layouts, pages and snippets dir tree. Then point the rails app to the radiant design dumped filesystem to load. Untill now I "get the job done" by hacking css, erb and partials manually into the rails app, but I'm looking for a cleaner, manageable and dry way. Do you please know a better way to go ? thz in advance lgs
on 24.08.2008 17:49
on 24.08.2008 18:54
You could conceivably pull the Radiant layout into your other app, but it's not going to get you much without the parsing framework of Radiant. The Radius tags embedded in the layout are very specific to Radiant's content model and you would spend a lot of time parsing or modifying them to work in your Rails app. The point of share_layouts is to bridge the gap between custom Rails functionality and Radiant's parsing framework; the tradeoff is that your Rails stuff should be created as an extension to Radiant. I believe you'll find that you won't lose much if you choose to do that. Your other option is to maintain separate layouts for your Rails app and for your Radiant installation. Sean
on 24.08.2008 21:37
What about the past try to pluginize radiant? I saw some old posts about mini_radiant plugin, RadiantOnRails and others, but they all seems to be died actually. Should be great to get a light radiant plugin or engine for classic rails, to add on complex preexisting backend rails application. I rally would like to be able to produce new layouts, sneppets and pages to that complex backend the same way I'm actually doing with Radiant (hoping that should speed up refactoring and maintenance). The share_layouts tradeoff is now clear to me and seems very powerful and promising for new dinamic extension which is projected from scratch, but in my case I really would need to integrate an OpenID server to the CMS (masquerade). I've a successful try with Comatose, but Radiant is clean, easy and powerful and two things really turn me on about that: extensions and layout management. I also tryed to port masquerade into radiant extension, but until now, without any success. Do you think could it be of some interest to anyone porting an identity server to a Radiant extension (http://github.com/dbloete/masquerade/tree/master)? In case, I'll share my steps and see if someone get some ideas to pass on my first failures. thz lgs