FIXED SOLUTION - C5mix SLATE Theme and HostCo BOOTSTRAP Theme. Probably applies to many themes.
Permalink Browser Info Environment
In the support area I can see that others have had issues with integrating Multiple Domains with the Slate template from C5mix. This is due to the hardcoded navigation in that theme. I'll use this topic to let others know how I integrate them. I've asked C5mix for some help at this time and I'll let you know how this works out in due course.
See below for:
SLATE LOGO or MAIN WEBSITE IMAGE
ADVERT AREA IN HEADER
LEFT NAVIGATION
MAIN NAVIGATION MENU ON C5MIX SLATE (Applies to BOOTSTRAP and all autonavs as far as I can tell)
See below for:
SLATE LOGO or MAIN WEBSITE IMAGE
ADVERT AREA IN HEADER
LEFT NAVIGATION
MAIN NAVIGATION MENU ON C5MIX SLATE (Applies to BOOTSTRAP and all autonavs as far as I can tell)
Type: | Discussion |
---|---|
Status: | New |
ADVERT AREA IN HEADER
I added MD_GA_PREFIX to the Global Area in the header so that the adverts can be specific to the mapped domain. On my current site they don't need to be specific but this should allow that capability in a different mapped domain.
$a = new GlobalArea(MD_GA_PREFIX . 'Header Top');
$a->display($c);
I added MD_GA_PREFIX to the Global Area in the header so that the adverts can be specific to the mapped domain. On my current site they don't need to be specific but this should allow that capability in a different mapped domain.
$a = new GlobalArea(MD_GA_PREFIX . 'Header Top');
$a->display($c);
LEFT NAVIGATION
Normally I put my autonav block in a stack. I tried to use the multiple domains autonav block in a stack but it gives an error saying that the page is not found.
In order to fix this I had to use the multiple domains autonav block directly on the page. Unfortunately this means editing quite a few pages instead of just updating the stack but I can live with that, it works.
Normally I put my autonav block in a stack. I tried to use the multiple domains autonav block in a stack but it gives an error saying that the page is not found.
In order to fix this I had to use the multiple domains autonav block directly on the page. Unfortunately this means editing quite a few pages instead of just updating the stack but I can live with that, it works.
To confirm this, I made a new stack and tried to add the multiple domains autonav block to it but it will not add to a stack. The error is: Page Not Found No page could be found at this address. Back to Home.
So this happens when you add the "Multiple Domains Auto-Nav" block as itself to a stack, right?
For the hard-coded one, could you post the code you were using to include that? We could see if there's something wrong with it.
For the hard-coded one, could you post the code you were using to include that? We could see if there's something wrong with it.
This is now working. You have to create the stack, add the multiple domains autonav block to it and place the stack on the page of the mapped site, all from the main domain.
I know you said this in your documentation but I think I accidentally tried to add it from my mapped domain.
And earlier today I had the navigation helper disabled whilst I was debugging something so that didn't help matters.
Right now I'm really stuck on Problog and I'm going find the code in the slate theme that you asked for. I'll edit these posts when I'm all done so that they are clear for people.
I know you said this in your documentation but I think I accidentally tried to add it from my mapped domain.
And earlier today I had the navigation helper disabled whilst I was debugging something so that didn't help matters.
Right now I'm really stuck on Problog and I'm going find the code in the slate theme that you asked for. I'll edit these posts when I'm all done so that they are clear for people.
Whoah! Really appreciate you posting all this, this seems really helpful for others as well.
Keep them coming! And let us know if you get stuck with something!
Keep them coming! And let us know if you get stuck with something!
MAIN NAVIGATION MENU ON C5MIX SLATE (Applies to BOOTSTRAP and all autonavs as far as I can tell)
Because the nav is hardcoded, in the Slate header.php you need the following code:
$bt = BlockType::getByHandle('multiple_domains_autonav');
$bt->controller->displayPages = 'top';
$bt->controller->orderBy = 'display_asc';
$bt->controller->displaySubPages = 'all';
$bt->controller->displaySubPageLevels = 'all';
$bt->render('templates/slate_main_nav');
?>
Make the following path and put the Slate's autonav template in it:
Root / blocks / multiple_domains_autonav_ / templates / slate_main_nav.php
------------------------------------------------
BOOTSTRAP Theme
For BOOTSTRAP I have put all the autonav templates in the same folder as above and they work.
For BOOTSTRAP (probably applies to many themes) the nav is not hardcoded, so you have to apply the template to the Multiple Domains Autonav BLOCK in the same way as you would to an Autonav BLOCK. Edit the page. Select the Multiple Domains Autonav Block. Select Custom Template and apply the template you want.
Because the nav is hardcoded, in the Slate header.php you need the following code:
$bt = BlockType::getByHandle('multiple_domains_autonav');
$bt->controller->displayPages = 'top';
$bt->controller->orderBy = 'display_asc';
$bt->controller->displaySubPages = 'all';
$bt->controller->displaySubPageLevels = 'all';
$bt->render('templates/slate_main_nav');
?>
Make the following path and put the Slate's autonav template in it:
Root / blocks / multiple_domains_autonav_ / templates / slate_main_nav.php
------------------------------------------------
BOOTSTRAP Theme
For BOOTSTRAP I have put all the autonav templates in the same folder as above and they work.
For BOOTSTRAP (probably applies to many themes) the nav is not hardcoded, so you have to apply the template to the Multiple Domains Autonav BLOCK in the same way as you would to an Autonav BLOCK. Edit the page. Select the Multiple Domains Autonav Block. Select Custom Template and apply the template you want.
The theme hardcodes a stack in the header. I couldn't work out a way to make MD_GA_PREFIX work with the stack so I simply made a new GlobalArea thus:
$a = new GlobalArea(MD_GA_PREFIX . 'SiteName');
$a->display($c);
NB I used 'SiteName' instead of 'Site Name' to avoid conflicts.