Hi everyone,
I am working on a subdomains' issue, someone else (who has left) did the code for the site, so any help would be appreciated.
There is a "About Us" nav bar on the main website eg www.mainwebsite.com, and we would like the "About Us" to disappear for any subdomains eg xxx.mainwebsite.com.
I can see from the Silverstripe backend, there is a Hide in Subdomains function, and I ticked it. However, the "About Us" link disappears for some time and it comes back at other tomes on both main site and subdomains.
Can anybody point me to the right direction how can I fix this problem? I have found the code below if it is useful, and I can copy more code here if needed. Please help.
Thanks heaps,
S:)
function ShowMenuInSubdomain()
{
$host = explode('.',$_SERVER['HTTP_HOST']);
$subdomain = $host[0];
if($subdomain != 'www' && $this->HideInSubdomains) {
return true;
}
}