Multi Site - Social Links and Global Areas

I’m developing a multi site for the first time and have come across an issue with the Social Links feature. I’ve set up different social links in settings for each of my multi sites, however when adding a social links block to a global area to display in each site footer, it always brings the same set of links through, no matter which site/domain I view it on. Is there some way of telling the block which site to use that I’m missing?

Also, is there a way to use different versions of a stack or global area for each site? The way you can do it for multilingual is perfect - set up a default and override it on a language basis when needed, but this doesn’t seem to be an option with multisite. I’m having to create multiple global areas using the site name to differentiate between them, but this leads to a big list of stacks which can get out of sync easily.

Thanks,
Ali

$app = \Concrete\Core\Support\Facade\Application::getFacadeApplication();
$siteHandle = $app->make('site')->getSite()->getSiteHandle();

or: 
$siteHandle = app('site')->getSite()->getSiteHandle();

$a  = new GlobalArea('Navigation - ' .  $siteHandle);

You could use the sitehandle as a suffix to get “unique” global areas.

Thanks for your reply. I’ve been doing that using the site name rather than the handle (I probably should switch to handle), I just hoped there was a more concise way of doing it like with multilingual, so they are linked together and could fall back to a default.

You could check if there are blocks in the unique area, if not load the default global area (without a handle)

2 Likes

Good idea! Thank you!

Related Issue

3 Likes