Howto integrate Radiant in existing application

172 views
Skip to first unread message

Abder Rachman

unread,
Jun 14, 2011, 2:10:25 PM6/14/11
to Radiant CMS
Hi,

I'm new to Radiant and may have overseen this in the existing docs,
but I couldn't figure out yet how to integrate Radiant into an already
existing (huge) application. My idea is not only to replace the public
pages by the CMS but also to use some snippets from the existing app
inside the Radiant pages. Can somebody please give me a hint to find
the best way to do this?

Thanks,
Abder

al...@akhlah.com

unread,
Jun 15, 2011, 1:30:09 PM6/15/11
to radia...@googlegroups.com
Abder -

I am working on something that is similar for someone - Upgrading a site
that is already existing and porting it to Radiant.

I started with working on a Template -
https://github.com/radiant/radiant/wiki/Make-a-Template-from-an-existing-site

Figured out what existing Extensions were available -

https://github.com/radiant/radiant/wiki/#extensions

And now I am working on moving and re-doing the content to make it look good.

I know that I will need to "roll my own" extensions or do some other
coding and there are tutorials on how to do that in the wiki )but I
haven't gotten that far)

Hope this helps some.

Al

Jim Gay

unread,
Jun 15, 2011, 2:13:15 PM6/15/11
to radia...@googlegroups.com
I've got plans to try to tackle this problem and get a better idea of
the solution, but here's the traditional answer:

1) Move your code into an extension (here's an example of an app that
became a public extension http://ext.radiantcms.org/extensions/12-ba )
2) Run 2 applications ( move your authentication/authorization outside
of the 2 apps and have them live side-by-side )
3) Edit radiant code directly and run it as an app (DON'T DO THIS, you
will run into trouble as the projects progress)

And what I'd like to try is

4) Use a radiant instance and add the Rails.root app directories into
the load path (they aren't there by default) and move all your code
over there. The hiccups here are surely going to be in loading routes,
but perhaps elsewhere.

That's what I want to try. If you beat me to it, please reply with
details. This is a common problem and I'd like to make it easier to do
this in the core.

-Jim

--
Jim Gay
Saturn Flyer LLC
http://www.saturnflyer.com
571-403-0338

Cleverlemming

unread,
Jun 17, 2011, 2:31:20 AM6/17/11
to Radiant CMS
I have a site that's about to launch that runs both Radiant and Spree.
I used a shop.domain.com subdirectory for the Spree store and the same
graphic theme for both. It appears to be a single application to end-
users, and the lack of shared authentication isn't a problem as having
two databases for admins and designers is actually useful in
compartmentalizing who works on what part of the site.

Cheers,
Pete

Abder Rachman

unread,
Jun 21, 2011, 3:37:10 PM6/21/11
to Radiant CMS
Hello Jim (and all),

thank you for the answers.
I also would like to go your 4th way. But I am afraid I have to choose
1) or 2) as I need to get this run within the next few days.
What details would you like to know? There is for example a list of
persons that needs to be displayed inside radiant pages. This list is
dynamic and should depend on some parameters you pass with the radiant
tag or the like. Also there is a registration form that must be
displayed on various radiant pages. The existing application has
almost 150 models, so I'm a bit scared to move this into an extension
although only a few models would be necessary to be used inside the
tags.

Maybe there is a way to have such custom tags containing content from
the existing app when I try to set up solution 2) ?

best,
Abder

On 15 Jun., 20:13, Jim Gay <j...@saturnflyer.com> wrote:
> I've got plans to try to tackle this problem and get a better idea of
> the solution, but here's the traditional answer:
>
> 1) Move your code into an extension (here's an example of an app that
> became a public extension http://ext.radiantcms.org/extensions/12-ba)
> 2) Run 2 applications ( move your authentication/authorization outside
> of the 2 apps and have them live side-by-side )
> 3) Edit radiant code directly and run it as an app (DON'T DO THIS, you
> will run into trouble as the projects progress)
>
> And what I'd like to try is
>
> 4) Use a radiant instance and add the Rails.root app directories into
> the load path (they aren't there by default) and move all your code
> over there. The hiccups here are surely going to be in loading routes,
> but perhaps elsewhere.
>
> That's what I want to try. If you beat me to it, please reply with
> details. This is a common problem and I'd like to make it easier to do
> this in the core.
>
> -Jim
>
>
>
>
>
>
>
>
>
> On Wed, Jun 15, 2011 at 1:30 PM,  <a...@akhlah.com> wrote:
> > Abder -
>
> > I am working on something that is similar for someone - Upgrading a site
> > that is already existing and porting it to Radiant.
>
> > I started with working on a Template -
> >https://github.com/radiant/radiant/wiki/Make-a-Template-from-an-exist...

Cleverlemming

unread,
Jun 21, 2011, 10:18:16 PM6/21/11
to Radiant CMS

> Maybe there is a way to have such custom tags containing content from
> the existing app when I try to set up solution 2) ?

Anything's possible in Rails:
http://www.paultastic.com/showpage/Grabbing-Data-From-Foreign-Database-Using-Rails
http://railsforum.com/viewtopic.php?id=24338 (just the first two
posts)

Create an extension for your models and custom tags:
https://github.com/radiant/radiant/wiki/Creating-a-Link-Roll-Extension/c7d81e370a77b9e09dc11d22726603ef123410b4
https://github.com/radiant/radiant/wiki/adding-custom-radius-tags

That should get you started.

Pete

Reply all
Reply to author
Forward
0 new messages