We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14671
    • 17 Posts
    Hi Guys,

    I am currently building a website that will be white labeled and sold onto other companies.

    I was wondering if it is possible to keep multiple domains under one roof but use different content/images. In places, I want to use a chunk that will work throughout all the sites and maybe news that goes through all the sites.

    EG - www.mydomaincambridge.co.uk
    www.mydomaincharlton.co.uk

    Hope you can help?

    Many thanks
    Jonathan Bradford
      • 7455
      • 2,204 Posts
      you could make a snippet like this maybe?:

      <?php
      $domain = $_SERVER['SERVER_NAME'];
      if ($domain == "www.mydomaincambridge.co.uk " || $domain == "mydomaincambridge.co.uk"){
      $domain = "1";
      }
      
      if ($option=="something"){
      if ($domain == "1"){
      return "something that you want";
      }else{
      return "the other thing";}
      }
      


      then call the snippet like this:
      [!snippetname? &option=`something`!]

      Hope this is what you mean

      Dimmy
        follow me on twitter: @dimmy01