Ruby Forum Radiant CMS > Radius integration with rails app

Posted by Kieran Johnson (Guest)
on 12.11.2007 20:35
(Received via mailing list)
Hi,

I've been looking through the source of Radiant and I'm not quite
sure which files I need to include in a rails app so I can just have
the use of radius. I can see that I need to require radius in my
environment.rb and include the files that contain the tags, but how
do I send them to the views so I can render them?

Sorry if this is a newbie question but Google turned up zilch.

Cheers

Kieran
Posted by Maged Makled (maged)
on 12.11.2007 21:08
Kieran Johnson wrote:
> Hi,
> 
> I've been looking through the source of Radiant and I'm not quite
> sure which files I need to include in a rails app so I can just have
> the use of radius. I can see that I need to require radius in my
> environment.rb and include the files that contain the tags, but how
> do I send them to the views so I can render them?
> 
> Sorry if this is a newbie question but Google turned up zilch.
> 
> Cheers
> 
> Kieran

I also have a rails app that I would like it to be used with Radiant. I 
would like to use radiant only for static pages And/Or the layout. Sorry 
for the newbie question but if anyone has any idea or tutorial on how to 
do that , it will be appreciated.

Thanks

Maged
Posted by Sean Cribbs (seancribbs)
on 12.11.2007 21:32
(Received via mailing list)
Depends on if you want to use just Radius, or the whole Radiant
application.  If you want to use just Radius, you can install the gem
and require it like you would any other gem.  Then you would define
your own context and tags within it, set up the parser and go.

For the case of integrating Radiant with your Rails app, the easiest
way is to build your app in a Radiant extension and use the
"share_layouts" extension to use the same layouts as your Radiant
pages.  If you want more detail with this, query me again.

Sean
Posted by Kieran Johnson (Guest)
on 12.11.2007 23:35
(Received via mailing list)
Thanks, its just using Radius within a Rails app. So do I put all the
tags within one context and parse that? Or can I separate them out a
bit and parse each one?

Kieran
Posted by Sean Cribbs (seancribbs)
on 13.11.2007 02:23
(Received via mailing list)
Have a look at the Radiant::Taggable module, PageContext class and
StandardTags module in the Radiant source to get an idea of one
strategy.  One way or another, the tag definitions end up on a subclass
of Radius::Context.  How they get there is up to you.

Sean
Posted by Maged Makled (maged)
on 14.11.2007 15:57
Sean Cribbs wrote:
> Depends on if you want to use just Radius, or the whole Radiant
> application.  If you want to use just Radius, you can install the gem
> and require it like you would any other gem.  Then you would define
> your own context and tags within it, set up the parser and go.
> 
> For the case of integrating Radiant with your Rails app, the easiest
> way is to build your app in a Radiant extension and use the
> "share_layouts" extension to use the same layouts as your Radiant
> pages.  If you want more detail with this, query me again.
> 
> Sean


Sean,
     I've tried to use rails_support_extension and it worked for a while 
but didn't work any more. Does the "Share_layouts" extension is the same 
idea, developing rails applications inside of the extension. what if I 
already have an app in production already and just need to use Radiant 
for static content storage, is there is a way to do so?

Thanks
Maged
Posted by Sean Cribbs (seancribbs)
on 14.11.2007 16:09
(Received via mailing list)
Maged,

If you can stand to run two separate applications, the easiest solution
is to use the web server to route requests to Radiant depending on the
domain or URL.  You won't get integration between, but it would be a
quick temporary solution until you can find a way to integrate them 
better.

Sean
Posted by Arpit Jain (arpit)
on 19.11.2007 10:32
Sean Cribbs wrote:
> Depends on if you want to use just Radius, or the whole Radiant
> application.  If you want to use just Radius, you can install the gem
> and require it like you would any other gem.  Then you would define
> your own context and tags within it, set up the parser and go.
> 
> For the case of integrating Radiant with your Rails app, the easiest
> way is to build your app in a Radiant extension and use the
> "share_layouts" extension to use the same layouts as your Radiant
> pages.  If you want more detail with this, query me again.
> 
> Sean

Hi sean.
   For integrating Radiant in my application , i am using mini_radiant 
plugin.
   But i am getting some routed issues with it.
   Can you please provide me with the details as how to build my own 
application in a Radiant extension.

Thanks
Arpit
Posted by Maged Makled (maged)
on 22.11.2007 17:39
Arpit Jain wrote:
> Sean Cribbs wrote:
>> Depends on if you want to use just Radius, or the whole Radiant
>> application.  If you want to use just Radius, you can install the gem
>> and require it like you would any other gem.  Then you would define
>> your own context and tags within it, set up the parser and go.
>> 
>> For the case of integrating Radiant with your Rails app, the easiest
>> way is to build your app in a Radiant extension and use the
>> "share_layouts" extension to use the same layouts as your Radiant
>> pages.  If you want more detail with this, query me again.
>> 
>> Sean
> 
> Hi sean.
>    For integrating Radiant in my application , i am using mini_radiant 
> plugin.
>    But i am getting some routed issues with it.
>    Can you please provide me with the details as how to build my own 
> application in a Radiant extension.
> 
> Thanks
> Arpit

Hi Arpit,
         I'm using radiant only as for my static content and layout, 
there is an extension that is called rails support that I'm currently 
using, it lets you create a rails application with radiant and use 
radiant for your static cms and layout. You could find docs and an 
example for that at
http://code.google.com/p/radiant-rails-support/

Thanks
Maged
Posted by Arpit Jain (arpit)
on 23.11.2007 07:43
Maged Makled wrote:
> Arpit Jain wrote:
>> Sean Cribbs wrote:
>>> Depends on if you want to use just Radius, or the whole Radiant
>>> application.  If you want to use just Radius, you can install the gem
>>> and require it like you would any other gem.  Then you would define
>>> your own context and tags within it, set up the parser and go.
>>> 
>>> For the case of integrating Radiant with your Rails app, the easiest
>>> way is to build your app in a Radiant extension and use the
>>> "share_layouts" extension to use the same layouts as your Radiant
>>> pages.  If you want more detail with this, query me again.
>>> 
>>> Sean
>> 
>> Hi sean.
>>    For integrating Radiant in my application , i am using mini_radiant 
>> plugin.
>>    But i am getting some routed issues with it.
>>    Can you please provide me with the details as how to build my own 
>> application in a Radiant extension.
>> 
>> Thanks
>> Arpit
> 
> Hi Arpit,
>          I'm using radiant only as for my static content and layout, 
> there is an extension that is called rails support that I'm currently 
> using, it lets you create a rails application with radiant and use 
> radiant for your static cms and layout. You could find docs and an 
> example for that at
> http://code.google.com/p/radiant-rails-support/
> 
> Thanks
> Maged

Hi Maged,

Thanks for the reply.
I have seen it, it let's you create a rails application in radiant 
extensions.
But what i need to do is to integrate radiant CMS in my own application.
Any further idea?

Thanks
Arpit