0

In Business Catalyst, is there a conditional statement that allows loading a different stylesheet based on whether or not a user is logged-in? Changing style using GetElementById does not work as there are multiple system-generated elements that need to be re-styled. I have tried GetElementByClassName, but this does not work. I thought perhaps by loading a completely separate stylesheet based on logged-in status might work. Thank you.

1 Answers1

3

You should be able to insert this tag:

    {module_isloggedin}

Anywhere you want... for example in your ID/class syntax:

    id="menu_{module_isloggedin}"  or class="menu_{module_isloggedin}"

Or you should be able to even do something like:

    <link rel="stylesheet" type="text/css" href="/login-{module_isloggedin}.css">

which will resolve to:

    <link rel="stylesheet" type="text/css" href="/login-1.css">

if the user is logged in and

    <link rel="stylesheet" type="text/css" href="/login-0.css">

if the user is not logged in...

Try that out... :)

Patrick Steil
  • 515
  • 4
  • 8