This project is read-only.

ThemeAttribute

If you want to offer your users the ability to change the theme , this helper makes all the work for you.

Just add this line to the RegisterGlobalFilters method in global.asax.cs
//default query parameter is "theme", default theme is "default"
filters.Add(new ThemeAttribute());

//use "skin" as the query parameter and set default theme to "Modern"
filters.Add(new ThemeAttribute(){ParamName = "skin",Default = "Modern"});

To generate the links which allow the users to change the theme
@Html.RouteLink("Default", new { theme="default"}) 
@Html.RouteLink("Modern", new { theme="modern"})

Users can change the theme simply by adding theme="theme_name" to the query url.

Last edited Feb 14, 2011 at 12:08 PM by mike_sapiens, version 2

Comments

No comments yet.