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?
We've moved the forum!
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
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)
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.
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.
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...
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.
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).
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.