Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hello,
I have a site with a number of sub-domains - site1.mysite.com, site2.mysite.com, site3.mysite.com - for example.
I'd like to basically render the same site for each sub-domain, but change the odd piece of content based on which sub-domain the user is visiting on.
It seems like I ought to be able to do this with dictionary items, but I can't really see how.
Any pointers would be appreciated!
Thanks,
- Chris
You can check get the host in xslt, then use xslt choose to render a specific template based on the host value.
<xsl:variable name="host" select="umbraco.library:RequestServerVariables('HTTP_HOST')" />
<xsl:choose>
<xsl:when test="$host = 'site1.domain.com'">
... do something
</xsl:when>
<xsl:when test="$host = 'site2.domain.com">
... do something else
</xsl:choose>
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Change content based on host header.
Hello,
I have a site with a number of sub-domains - site1.mysite.com, site2.mysite.com, site3.mysite.com - for example.
I'd like to basically render the same site for each sub-domain, but change the odd piece of content based on which sub-domain the user is visiting on.
It seems like I ought to be able to do this with dictionary items, but I can't really see how.
Any pointers would be appreciated!
Thanks,
- Chris
You can check get the host in xslt, then use xslt choose to render a specific template based on the host value.
<xsl:when test="$host = 'site1.domain.com'">
</xsl:when>
<xsl:when test="$host = 'site2.domain.com">
... do something else
</xsl:when>
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.