Esempio n. 1
0
 public OxiteViewModelItems <KeyValuePair <PostTag, int> > Cloud()
 {
     return(new OxiteViewModelItems <KeyValuePair <PostTag, int> >(tagService.GetTagsWithPostCount())
     {
         Container = new TagCloudPageContainer()
     });
 }
        public void OnActionExecuted(ActionExecutedContext filterContext)
        {
            OxiteViewModel model = filterContext.Controller.ViewData.Model as OxiteViewModel;

            if (model != null)
            {
                string blogName = filterContext.RouteData.Values["blogName"] as string;

                if (blogName != null)
                {
                    model.AddModelItem(new TagCloudViewModel(tagService.GetTagsUsedIn(new BlogAddress(blogName))));
                }
                else
                {
                    model.AddModelItem(new TagCloudViewModel(tagService.GetTagsWithPostCount()));
                }
            }
        }