I'm running out of ideas here. Maybe you can advise me which template or method to use.
The user should be able to log in and change the appearance only for his profile. The difference (AFAIK) with personalization is that the personalized layout is displayed only for the editor (he). The difference between skins, I think, is that skins are predefined, but users should be able to change the settings on their own.
I need to be able to display an individual layout for everyone who visits the authorβs page.
A good solution would be to save the layout information in the database table. It should also be cached, I assume that you take the load from the database and is used in CSS.
thank
Edit:
OK. I did some research. I came up with such an idea.
In the view, enter userId (type Guid) from the database and set it to ViewData: ViewData ["userId"] = profile.userId;
This view uses the following master file called "Profile.Master" and links to a dynamic CSS file:
<link href="<%= Url.Action("Style", "Profile",
ViewData["userId"]) %>" rel="stylesheet" type="text/css" />
</head>
In ProfileController, get the CSS data from the database and return it to the CSS dynamic view:
public ActionResult Style(Guid userId)
{
var styles = (from s in Db.UserStyleSet.OfType<UserStyle>()
where s.aspnet_Users.UserId == userId
select s);
return View("Style", styles);
}
The problem is that UserId is never passed to a dynamic CSS link:
'userId' 'System.Guid' 'System.Web.Mvc.ActionResult Style (System.Guid)' 'Project.Controllers.ProfileController'.
, .