White labeling silverstripe project

假装没事ソ 提交于 2019-12-13 17:14:47

问题


I m fairly new in Silverstripe. We've a project in silverstripe and we are asked to do white labelling. That means there will be different URLs that will be accessing same codebase with different design, logos, members, etc.

For Example, We have three clients

Client: ABC

URL: http://www.abcclient.com/admin
URL: http://www.abcclient.com/

Client: XYZ

URL: http://www.xyzclient.com/admin
URL: http://www.xyzclient.com/

Client: PQR

URL: http://www.pqrclient.com/admin
URL: http://www.pqrclient.com/

etc

Requirement

  • Each client have their own admin url and client url.
  • Each domain should point to same folder in the server.
  • Each client should have their own members (in Security module in admin)
  • Each client should have their own CMS design, Client design, logos

What I have done so far?

  • I have created new Page "Clients" in CMS, that adds each clients, along with their details.
  • I have extended Members so that while adding/editing members,the custom dropdown will appear that will list all available clients. And from there we can select the Client which the member belong to.

Problem

  1. Can we whitelabel Silverstripe? If yes how?
  2. When admin is accessed from certain domain, they will only see/filter/add/edit Files, Members related to them.

I m not asking for Code, but an idea will do a great help.

UPDATE The project doesn't have frontend based on Silverstripe so need to whitelabel CMS only.

Thanks


回答1:


Can we whitelabel Silverstripe? If yes how?

Yes Silverstripe is BSD license so there is no need to mention silverstripe at all!

For starters add this to the config.yml

LeftAndMain:
  application_name: 'My Application'
  application_link: 'http://www.example.com/'
  extra_requirements_css:
    - mysite/css/branding.css

with this in mysite/css/branding.css

.ss-loading-screen {
    background: #fff;
}
.ss-loading-screen .loading-logo {
    background: transparent url('../images/my-logo-loading.png') no-repeat 50% 50%;
}
.cms-logo a {
    background: transparent url('../images/my-logo-small.png') no-repeat left center;
}

When admin is accessed from certain domain, they will only see/filter/add/edit Files, Members related to them.

I've not used it, but the Subsites Module is the recommended approach for this. from the module readme.md...

"The subsites module provides a convenient way of running multiple websites from a single installation of SilverStripe, sharing users, content, and assets between them - the sites will be managed from a single CMS.

A useful way to think of its use is where you have a business with a global headquarters and four branches in various countries. The subsites module allows the five offices to use a single SilverStripe installation, and have information from the headquarters flow down into the branches. The branches can hold information that is individual and the website templates can also be different."

As well as the module there is also user help for subsites.

Specifically where there is different content per site and you wish to restrict these objects based on the subsite... the documentation covers that here



来源:https://stackoverflow.com/questions/38631017/white-labeling-silverstripe-project

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!