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
I've read up a bit on managing hostnames, and it kind of sounds like what I need to do but in reverse.
I have one site (repository of support documents) but I need to have two different stylesheets, one themed for company A, one for company B. I want to avoid having two copies of everything to make maintenance easier.
When you access companyA.supportsite.com I need it to show the content using their stylesheet, and when you access companyB.supportsite.com I need it to use the other stylesheet.
This will have a search and users will be going up and down the content tree to find what they need.
Is this possible to do, and if so please could anyone suggest what I should be looking into? I assume it's going to take a combination of server settings/redirects and umbraco.
You can get the current hostname from umbraco.library:RequestServerVariables('HTTP_HOST'). So here is my suggestion
<xsl:variable name="url" select="umbraco.library:RequestServerVariables('HTTP_HOST')"/><xsl:choose> <xsl:when test="$url='your url'"> <link href="/css/StyleA.css" rel="stylesheet" type="text/css" /> </xsl:when> <xsl:otherwise> <link href="/css/StyleB.css" rel="stylesheet" type="text/css" /> </xsl:otherwise></xsl:choose>
Create a macro which calls above xslt and use that macro within the head tag of your template.
Very nice, I'll give it a try. Thanks very much Pnima!
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted