On Tue, Aug 17, 2010 at 4:55 PM, Haselwanter Edmund <edm...@haselwanter.com> wrote: > Hi *, > > I'm thinking on merging some of my radiant sites into one instance of radiant > with the multi-site or the vhost extension. > Could somebody come up with a brief explanation of the differences of the two?
MultiSite It runs all sites for all users. If you have access to one you have access to all (although there are forks out there that may change that) A site belongs_to a homepage (no change to the pages table data, but you still need to change other tables) Vhost You specifically add user access to each site, so users are restricted by default. A site has_many pages (site_id added to pages and any other models) With multi-site (which I haven't used much) as far as I am aware you need to make changes to extensions to get them to lookup information based upon the "current site". In Vhost, it uses an around filter on your controllers to scope all necessary activerecord queries to the current_site. So you can add an extension which does not have multisite support, run a rake task to add a column (after updating a vhost.yml file) and you're good to go. The addition of the sheets extension complicated things a bit for vhost and I'm working through that (don't recall if I've pushed any changes yet). But I'm working through these ideas before I start working on them in the core. Will Ross (spanner) has also been working with a Sites extension. And Josh French at Digital Pulp has done a lot of work with multi-site. I like the approach of vhost because it's hands off. If you want some extension to be scoped by site then you make it so with a configuration file. That might not be the best long-term approach, but it makes it easy to use any extension out there for your multiple site setup. I've recently been adding the ability to better manage multiple domains per site in vhost, but much of the changes aren't done on a strictly test-first philosophy (which I really should change). What initially sold me on the ideas in vhost was that users were restricted by default and that I didn't need to use the multi-site fork of paperclipped. If I wanted paperclipped with vhost I just use it. > > And if I can recall it correctly I read about some changes to core so it > would be easier to enable radiant for multiple sites in one radiant instance. > Is there something going on in this direction? I've been doing a lot of thinking about this lately, but not applied anything to radiant core. Feedback and ideas are welcome. I want to work on vhost more as well as multi-site so that I'll know the benefits and drawbacks before adding anything to the core. But we have discussed taking the philosophy of multi-site that out of the box radiant does not restrict users from other sites; it would be up to an extension to add that. > > cu edi > -- > DI Edmund Haselwanter, edm...@haselwanter.com, http://edmund.haselwanter.com/ > -- Jim Gay Saturn Flyer LLC http://www.saturnflyer.com 571-403-0338