OX6:Using Brands/Whitelabeling with Open-Xchange Hosting Edition

From Open-Xchange

Using multiple brands in Open-Xchange

Task

You want to host the contexts of different brands in a single installation. These brands vary in some of their branding settings. You can define all these different brands via simple configuration files. A brand consists of a definition of properties like product name, logout url, session timeout url and also different Upsell properties to use.

Requirements

Please make sure you have the package open-xchange-hostname-config-cascade installed. Else the generated URLs for publications and notification mails won´t contain the branded domain/host name.

Solution

Let's consider three brands we want to configure. We'll call them "Groupware4You", "CollaborationPro" and "OneStopShop".

Branding in OX is governed by various ui properties. Please note that these examples are primarily OX6 frontend properties. App Suite uses different ones which are not covered here to explain the concept. With these you can:

  • Change the help path (ui/global/help/help_path)
  • Change the FAQ path (ui/global/help/faq_path)
  • Change where the ui redirects to, on logout (ui/global/logout_path)
  • Change where the ui redirects to on session expiration (ui/global/sessionExpired_path)
  • Change the ui direct link path (ui/global/directLink_path)
  • Change the url of the page that suggests UWA widgets (ui/global/uwa/link)
  • Change the product name in the about dialog (ui/product/name)
  • Change the product description in the about dialog (ui/product/description)
  • Change the vendor address in the about dialog (ui/product/vendor/address)
  • Change the path where the themes can be found (ui/global/theme/path)
  • Change the hostname for notification mails / publication URLs etc (com.openexchange.hostname)


First, we create the default branding settings in the file /opt/open-xchange/etc/groupware/settings/branding.properties

   ui/global/help/help_path=[protocol]://groupware4you.com[path]/help/[language]
   ui/global/help/faq_path=[protocol]://groupware4you.com[path]/faq
   ui/global/logout_path=[protocol]://groupware4you.com[path]/logout
   ui/global/sessionExpired_path=[protocol]://groupware4you.com[path]/sessionExpired
   ui/global/directLink_path=[protocol]://groupware4you.com[path]#m=[module]&f=[folder]&i=[object_id]
   ui/global/uwa/link=http://groupware4you.com/uwa/widgets.html
   ui/product/name=Groupware 4 You
   ui/product/description=Groupware 4 You - The groupware for everyone
   ui/product/vendor/address=Some Address
   ui/global/theme/path=themes/
   modules/themes/default=GW4U Theme

In /opt/open-xchange/etc/groupware/system.properties add the line: com.openexchange.hostname=groupware4you.com


Next, let's define the two other brands. If a context belongs to a certain brand, the branding options will be overridden by the config cascade.

Create a file /opt/open-xchange/etc/groupware/contextSets/branding.yml.

   cpro:
       withTags: cpro
       ui/global/help/help_path: "[protocol]://collabpro.com[path]/help/[language]"
       ui/global/help/faq_path: "[protocol]://collabpro.com[path]/faq"
       ui/global/logout_path: "[protocol]://collabpro.com[path]/logout"
       ui/global/sessionExpired_path: "[protocol]://collabpro.com[path]/sessionExpired"
       ui/global/directLink_path: "[protocol]://collabpro.com[path]#m=[module]&f=[folder]&i=[object_id]"
       ui/global/uwa/link: "http://collabpro.com/uwa/widgets.html"
       ui/product/name: "CollaborationPro"
       ui/product/description: "Don't just be a team, be a unit"
       ui/product/vendor/address: "Some Address"
       ui/global/theme/path: "themes/cpro/"
       com.openexchange.hostname: "collabpro.com"
       modules/themes/default: "Collab Theme"
      
   oss:
       withTags: oss
       ui/global/help/help_path: "[protocol]://OneStopShop.com[path]/help/[language]"
       ui/global/help/faq_path: "[protocol]://OneStopShop.com[path]/faq"
       ui/global/logout_path: "[protocol]://OneStopShop.com[path]/logout"
       ui/global/sessionExpired_path: "[protocol]://OneStopShop.com[path]/sessionExpired"
       ui/global/directLink_path: "[protocol]://OneStopShop.com[path]#m=[module]&f=[folder]&i=[object_id]"
       ui/global/uwa/link: "http://OneStopShop.com/uwa/widgets.html"
       ui/product/name: "One Stop Shop"
       ui/product/description: "One Stop Shop - Be informed"
       ui/product/vendor/address: "Some Address"
       ui/global/theme/path: "themes/oss/"
       com.openexchange.hostname: "OneStopShop.com"
       modules/themes/default: "OSS Theme"

Important: In the folder pointed to using ui/global/theme/path must be located a folder called "default" containing the default theme that brand should use. In addition, if you might want to remove the entries in the themes.properties in /opt/open-xchange/etc/groupware/settings if users should only see themes depending on their brand.


Now we'll tag the contexts. This will assign the contexts to a certain brand.

Groupware4You Contexts

  changecontext -c1 ... --taxonomy/types=gw4u
  changecontext -c2 ... --taxonomy/types=gw4u

CollaborationPro Contexts

  changecontext -c3 ... --taxonomy/types=cpro
  changecontext -c4 ... --taxonomy/types=cpro

OneStopShop Contexts

  changecontext -c5 ... --taxonomy/types=oss
  changecontext -c6 ... --taxonomy/types=oss


links_in_email
logouturl
about_dialog_wizzard
wizzard_theme

Programming examples

perl

The file http://software.open-xchange.com/OX6/doc/SOAP/admin/branding-example.pl is an example on how to implement it in perl.

C#

Check Provision using C# on how to do the same in C#.