private void InitialiseBaseViewModel(LayoutModel model) { model.Config = Services.Config.Current; model.User = Services.User.Current; model.Theme = Services.Theme.Current; //model.Base = new LayoutModel.LayoutCommonModel //{ // FriendlyUsername = currentUser.FriendlyName, // IsAuthenticated = currentUser.IsAuthenticated, // IsAdmin = currentUser.IsAdmin, // Theme = theme, // Config = config //}; }
private void InitialiseBaseViewModel(LayoutModel model) { var currentUser = Services.User.Current; var config = Services.Config.Current; model.Base = new LayoutModel.LayoutBaseModel { FriendlyUsername = currentUser.FriendlyName, IsAuthenticated = currentUser.IsAuthenticated, IsAdmin = currentUser.IsAdmin, Theme = config.Theme, SiteTitle = config.Title, SiteMetaDescription = config.MetaDescription, SiteTagline = config.Tagline, SiteHeading = config.Heading, Crossbar = config.Crossbar, GoogleAnalyticsId = config.GoogleAnalyticsId, TwitterUsername = config.TwitterUsername }; }