Forums

Forums / Developing Portals / Conditional CSS Logic based on the user

Conditional CSS Logic based on the user

Thread is closed for posting
2 posts, 1 answered
  1. j.mondy
    j.mondy avatar
    12 posts
    Registered:
    09 Oct 2015
    09 Oct 2015
    Link to this post
    Hi all!

    I'm working on a portal that will support multiple companies within a larger corporate environment. Part of my design specifications require me to implement conditional CSS scripting based on the user's company (Company X gets blue text, Company Y gets red, etc.). My initial guess would be to filter based on custom user groups, but I'm not sure how to implement. How would I go about implementing this kind of logic? Thanks.
    Last modified on 09 Oct 2015 20:10 by j.mondy
  2. Missing user
    Missing user avatar
    Answered
    14 Oct 2015 in reply to j.mondy
    Link to this post
    Hi Mondy,

    Here is a simple way that you can accomplish this:

    Click and drag a CSS widget into the page or template.

    Click on the 'More' collapsible located at the top of the widget and click on 'Permissions'.

    Step 1 Directions

    Underneath the permissions menu, you will have the option of setting the user roles that are allowed to use a widget. If a user doesn't have the permissions to view a CSS widget, the CSS will not take effect on the page. With this, you can create a number of user roles for each particular company and restrict their viewing permissions to the CSS widget meant for them. Please keep in mind that if a user has multiple roles that apply to this widget's viewing permissions, both CSS widgets will apply. In addition to this, if you are an administrator both CSS widgets would also apply.

    Step 2 Permissions
    >

    Hopefully this helps!

    Regards,

    Chris.

    Last modified on 14 Oct 2015 15:10 by Missing user
2 posts, 1 answered