4

I have an multi user application with basic layouts where i want to change the layout and style of the page for individual user .

I have one way in mind that to change the css at run time but if i am changing the css then it will take effect for every user and if i will refresh the page then it shows basic page again.

Help me for this problem that if i will change the css then it will take effect only for the same user. and it will not change after refresh.

Or any buddy has any other idea then please suggest me.

4 Answers 4

2
$("div#somediv").addClass("specialuserclass");

JQuery reference or have a stylesheet per user;

Sign up to request clarification or add additional context in comments.

1 Comment

thanks for ans I need to change css class permanently. Once i change it will not on refresh untill i will not change again
1

You might be interested in doing this using themes and the theme manager plugin I built. The plugin is built to work with jQuery UI themes, but could easily be adapted to your own custom CSS-based themes. This plugin works with individual user preferences for a particular theme stored in a database, though I suppose you could also use a cookie. the latter would take more customization. You can find more info on my blog, http://farm-fresh-code.blogspot.com.

Comments

0

You have to persist the style chosen by each user.

Your can design your function/screen to something like: 1. On create of a new user, give the user the default basic layout and persist this in the server side (you can probably save the user preference in your DB). 2. When he changes style, update the user's user preference record/file 3. On load of the page, retrieve the user preference and change the css style on the server side

Comments

0

If you want to implement this yourself, store your user-specific styles in a dedicated store such as a database, indexed by user. At page construction time (server side) consult your database, looking up the customizations for that user, and apply the CSS you want to that page.

Alternatively there are a variety of theming applications available. These will depend on your server-side tools. For example, ASP.NET offers the Web Parts Framework.

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.