Back to Multiple Websites Manager Lite Support

misterbean36757
misterbean36757

Hello. I am pretty new to October CMS and have recently installed the Multiple Site plugin. I am a little unsure as how to actually use it. You instruct users to start by reading the "whole documentation" first, but I can't seem to locate any. The documentation provided is rather sparse and I just don't understand how use this plugin. Can you please direct me to the whole documentation you refer to? Thanks.

Briddle
Briddle

Hello misterbean36757,

Thank you for your interest in my plugin.

The documentation on the product page for this plugin is it I’m afraid.

You mention that you have already installed the plugin so that is a good starting point :)

  1. Now, browse to the October CMS installation on your server and create the file config/briddle/multisite/config.php
  2. Please use the example in the documentation to add the (sub)domains you have prepared to this file
  3. That’s it really

Please do let me know if you run into trouble!

misterbean36757
misterbean36757

Hey Briddle. I appreciate your prompt response. So I am guessing that I must first install October on each domain I will have listed in the config.php file, then install the theme I want to use for each domain and assign that in the same file? I guess I was under the impression that I would have access to each domain from a master domain and be able to make changes and updates from one dashboard.

If that is not the case, then am I able to set other variables in that config.php file? For example; I have a number of sites that share a lot of commonalities, like same layout for terms, privacy, cart, and checkout pages. But some sites will require slightly different verbiage in the terms pages. What I am trying to accomplish is setting something up to where I can say "Ok, this site requires THESE terms, so set that variable in the config file so the proper terms display in the proper places throughout the site".

It might also be helpful to note that I am building these sites using the Blocs app for OSX, which allows me to export themes to October CMS format.

Please let me know if you need anymore clarification from me to help you understand my goals better.

Thanks!

Briddle
Briddle

Hello,

"So I am guessing that I must first install October on each domain I will have listed in the config.php file"

No! You only need to install October CMS once, just like you would any other installation.

The multiple website manager plugin simply allows you to attach a different theme based on different (sub)domains.

  • All themes are hosted on the same installation of October CMS
  • The different (sub)domains are simply all pointing to the same installation.
  • This also makes the /backend available under all (sub)domains

In terms of editing:

  • all sites can have a completely different theme (or have the same theme)
  • all sites can have completely different content (if it is file-based) or the same content
  • all sites are accesible for the same users with the same credentials
  • all sites use the same Media folder
  • all sites use the same plugins
  • all sites use the same database

For your case I would say you do not need this plugin at all. Simply create domain aliases (making the same website available under different domain names) and read the active domain name. You can use this domainname to create if/else in twig.

Do you understand what I mean?

Last updated

Briddle
Briddle

Example

PHP section:

function onStart()
{
    $this['domain'] = $_SERVER['HTTP_HOST'];
}

Inside HTML:

{% if domain == 'www.firstdomain.com' %}
       <p>The first domain</p>   
{% else %}
          <p>Not the first domain</p>  
{% endif %}
misterbean36757
misterbean36757

Thanks again for your help on this. What you've provided makes sense and I will give it a try later today. Thank you!

Briddle
Briddle

You can also configure October CMS itself to use different environments based on the domainname:

https://octobercms.com/docs/setup/configuration#base-environment

https://octobercms.com/docs/setup/configuration#domain-environment

Last updated

bojko9154112
bojko9154112

Briddle said:

Example

PHP section:

function onStart()
{
   $this['domain'] = $_SERVER['HTTP_HOST'];
}

Inside HTML:

{% if domain == 'www.firstdomain.com' %}
      <p>The first domain</p>   
{% else %}
         <p>Not the first domain</p>  
{% endif %}

Hello, Could you help a little bit, how can this be configurated for several subdomains.

For now I use this like example and everything works fine, but in future we will have a several subdomains. I will try with several if`s but i think there is better thing to do

Last updated

1-8 of 8