I have a Visualforce page which has a default CSS stylesheet declared, which is always used for general styling. What I would like to do, however, is have alternate stylesheets to change brand colours on the page depending on who the user is.
<apex:stylesheet value="{!$Resource.DefaultCSS}" />
<apex:stylesheet value="{!IF(<useBrand>,$Resource.CustomCSS_<myBrand>}" /> <!-- this line is where I don't know what to do
So in my controller I have the variables useBrand and myBrand (based on the User), and I need to get the matching stylesheet to use that brand's colour palette.
How would I declare the custom stylesheet? If there is no brand specific info on the user, then the 2nd stylesheet is not required as everything is in the default one. The 2nd stylesheet, if used, overwrites the colours from the default one. The name of the custom stylesheet will be the same for all, except for the suffix (_myBrand).
Is there a way to declare a stylesheet based on a variable in the page controller, and to build the name of the stylesheet using the variable?