Jump to:

23001 Posts in 11702 Topics by 2827 members

General Questions

SilverStripe Forums » General Questions » Multi site possibilities?

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

Page: 1
Go to End
Author Topic: 1752 Views
  • TonySWaby
    Avatar
    Community Member
    1 Post

    Multi site possibilities? Link to this post

    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?

  • Willr
    Avatar
    Forum Moderator
    5462 Posts

    Re: Multi site possibilities? Link to this post

    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)

  • Stefdv
    Avatar
    Community Member
    110 Posts

    Re: Multi site possibilities? Link to this post

    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.

  • dompie
    Avatar
    Community Member
    88 Posts

    Re: Multi site possibilities? Link to this post

    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.

  • Stefdv
    Avatar
    Community Member
    110 Posts

    Re: Multi site possibilities? Link to this post

    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...

  • dompie
    Avatar
    Community Member
    88 Posts

    Re: Multi site possibilities? Link to this post

    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.

  • Stefdv
    Avatar
    Community Member
    110 Posts

    Re: Multi site possibilities? Link to this post

    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).

  • DsX
    Avatar
    Community Member
    178 Posts

    Re: Multi site possibilities? Link to this post

    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.

    1752 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.