Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Multi site possibilities?


Reply


8 Posts   1890 Views

Avatar
TonySWaby

Community Member, 1 Post

29 June 2010 at 8:19pm

I have a client that wants a corporate site with possibly 25 dealer sites which will share some of the data. The main site should be able to administer all sites, however the dealers can only administer their own. Is this possible in SS?

Avatar
Willr

Forum Moderator, 5513 Posts

29 June 2010 at 10:10pm

Yes it is possible. You would want to setup a site using subsites as well as a custom groups for each subsite and give admin access to each dealers sites to that specific group.

Download for 2.4 - http://silverstripe.org/subsites-module/TrunkDownload/generate
See http://doc.silverstripe.org/modules:subsites for some docs (might be out of date some of that)

Avatar
Stefdv

Community Member, 110 Posts

21 February 2011 at 4:51am

Hello,
I know this an old post but i need about the same functionality.
I'll host some sites for Dog breeders, they have there own site ( seperate SS installations ). So now they all have there own Database. I would like to be able to use some of that data on a 'main' site...for instance there dog information with there pedigree.
In the ideal world it would be great if the mainsite would even update automatically when data changes on one of the seperate sites.

The problem i have if i would use the subsites module is that they all have access to the same assets and the same pagetypes. Since i made some pagetypes for specific breeders i don't want other breeders to use those.

any reply would be great.

Avatar
dompie

Community Member, 88 Posts

24 February 2011 at 12:21am

You can also limit access to pagetypes by querying the subsite id in the canCreate function. The only requirement for that is, that subsiteIDs do not change.
Furthermore the assets access may be limited to each subdomain, for some reason this does not work always faultless at the current state.

Avatar
Stefdv

Community Member, 110 Posts

24 February 2011 at 5:15am

Edited: 24/02/2011 5:15am

thank u for your reply...

I think this is going 'over my head' ...

" You can also limit access to pagetypes by querying the subsite id in the canCreate function. "

maybe i'm not ready for this thing....

If you would like to explain in depth i would be most thankfull...

Avatar
dompie

Community Member, 88 Posts

24 February 2011 at 10:18pm

Edited: 24/02/2011 10:21pm

Yes, of course. In my case it was required to allow the creation of EventPages only on a specific subsite, e.g. events.mydomain.com

class EventPage extends Page {
   public static $db = array(
...
   );
   
   public function canCreate(){
      $ssID = Subsite::currentSubsite();
      if($ssID instanceof Subsite){
         return ($ssID->getField('ID')>0) ? true : false; //All subsites are allowed to create EventPage, but not Main Site
      }
      return false;
   }
...


I compare SubsiteIDs, I had to distinguish between Mainsite and Subsite. But you can compare to the subsitedomain string directly. Should work better for your scenario.
It works quite reliable, but not always. Some day I'll find out why.

Avatar
Stefdv

Community Member, 110 Posts

25 February 2011 at 4:57am

Dompie,

Thank U for the reply, I'll give it a try...
I guess everything is possible with this cms, as long your willing to learn. ( And i am).

Avatar
DsX

Community Member, 178 Posts

20 February 2013 at 7:16am

I am needing to add this functionality to a current site, using SS 2.4
however, all subsite 2.4 documention on Subsite is gone..
Can anyone point me in the right direction??

Upgrading to SS 3 is not an option for this site.