You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.
NOTE: This post was created on 2023-04-25 on the Kryptronic eCommerce Community facebook page, which has been replaced with this forum. All facebook support content was migrated into this forum in April 2024.
Evan:
Hello, I'm attempting to add an additional multisite splash page description but apparently not structuring the code properly. Can you help me tweak this with whatever is missing? Thank you...
code]
<?php $multisiteid = $this->globals('core.multisiteid'); if (empty($multisiteid)) {$multisiteid = 'DEFAULT';} ?>
<?php if ($multisiteid == 'multisite1') { ?>
<p>Welcome to multisite1.com! description</p>
<?php if ($multisiteid == 'multisite2') { ?>
<p>Welcome to multisite2.com! description</p>
<?php } else { ?>
<p>Welcome to mainsite.com! Description</p>
<?php } ?>
<?php $this->include_namespace('ecom','prodfeature'); ?>
code
I have tried other variations resulting in either duplicating the mainsite and multisite1 on every site or not loading the splash content at all. If I need to override this in multisite settings I suppose that's okay but thought this appeared to be the correct location to add to or modify the code to individualize the multisites.
Rob:
Hi Evan,
I use the following and it is working:
$multisiteid = $this->globals('core.multisiteid');
$multisiteactive = $this->globals('core_settings.core.multisite');
if ($multisiteactive && ($multisiteid == 'multisite1')) {
multisite 1 code
} etc
Evan:
How might this affect other multisites? We have three multisites all with different splash page descriptions. Thank you 🙂
Rob:
Can extend to as many multisite as you need
if ($multisiteactive && ($multisiteid == 'multisite1')) {
multisite 1 code
} elseif ($multisiteactive && ($multisiteid == 'multisite2')) {
multisite 2 code
} elseif ($multisiteactive && ($multisiteid == 'multisite3')) {
multisite 3 code
} else {
default code
}
Offline