예제 #1
0
        protected object GetPostsByTag(string key, GraffitiContext graffitiContext)
        {
            PostCollection pc = ZCache.Get<PostCollection>("Tags-" + TagName);
            if (pc == null)
            {
                pc = Post.FetchPostsByTag(TagName);
                ZCache.InsertCache("Tags-" + TagName, pc, 60);
            }

            return pc;
        }
예제 #2
0
        protected override void LoadContent(GraffitiContext graffitiContext)
        {
            IsIndexable = false;

            graffitiContext["where"] = "tag";
            graffitiContext["title"] = TagName + " : " + SiteSettings.Get().Title;
            graffitiContext["tag"] = TagName;

            graffitiContext.RegisterOnRequestDelegate("posts",GetPostsByTag);

            // GetPostsByTag needs to be called so the pager works
            GetPostsByTag("posts", graffitiContext);
        }
예제 #3
0
 private void ga_LoadGraffitiContext(GraffitiContext context, EventArgs e)
 {
     context["calendarFeeds"] = CalendarFeeds;
 }
예제 #4
0
 public GraffitiRepository(GraffitiContext db)
 {
     Context = db;
 }