I have a C1 CMS with 5 domains / sites in it.
I need a Page Template Feature to display different content depending on which site it's on. Or perhaps have a page template embed a different Page Template Feature depending which site it's on.
One way would be to use the domain of the site to differentiate somehow (I don't know how). Are there any other ways to do this - what would be best?
Thanks.
I simply put razor code like this in the MasterLayout.cshtml page to display the appropriate Page Template Feature, depending on the domain:
@{
if (Request.Url.ToString() == "http://Domain1.com")
{
@PageTemplateFeature("Footer Domain1.com Front Page")
}
else if (Request.Url.ToString() == "http://Domain2.com")
{
@PageTemplateFeature("Footer Domain2.com Front Page")
}
else
{
@PageTemplateFeature("Footer All Other")
}
}
It is a shame there isn't a way of doing this within the C1 CMS itself - but this works fine.