0

We have a list containing the ADUsername and Boolean field (Yes/No) columns. Based on the logged in user we are fetching this list item and corresponding value for yes/no field.

Now we want to change the look of the SharePoint site based on this value.

Yes=Blue suitebar and top bar.

No=Green suitebar and top bar.

Possible solutions we have envisioned:

  1. Composed looks (we have worked on this but not sure if they can be changed on run time)

  2. Master page (creating master page with hardcoded blue/green color, but not sure if it is possible to call master page at runtime)

I believe both above methods will fail as there will be multiple users accessing the site at same time and changing the master page/composed look at run time is not feasible.

The 3rd method we were thinking of is to use Javascript on the Master Page using client object model to detect the list item (yes/no) value and change the CSS colors/file dynamically.

Another option was to create a user control and put it on the master page.

Let me know your views on this approach or other possible solution. Thanks.

1 Answer 1

0

If your solution scope is FARM: you can add user control to your master page, which will render an html of your liking based on your factors.

Javascript is good as well, but your bar will change only after the page loads. As it will be on document.ready and will take a second to fetch information from your list and set right background to the div etc.

1
  • Another option was to create a user control and put it on the master page.?
    – variable
    Mar 21, 2014 at 10:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.