def servePage(self, page_id, current_info): print "[Site] SiteEdit servePage: servingPage<br>" edit_mode = current_info['edit_mode'] if AmiCache.isCacheUp2Date(page_id, is_edit=edit_mode): if current_info['is_CMS_page']: amiweb.session()["current_page_id"] = page_id content = AmiCache.getValue(page_id, is_edit=edit_mode) else: content = renderView(current_info, "site_structure") AmiCache.updateCache(page_id, content, is_edit=edit_mode) page = Model.Pages.getPageById(page_id) #Append dynamic sections to this content = sections.fillSections(current_info, content, page) return content
def servePage(self, page_id, current_info): #print "[Site] Site servePage:<br>" if page_id and AmiCache.isCacheUp2Date(page_id): #print "[Site] Site servePage: pulling page from session<br>" if current_info['is_CMS_page']: amiweb.session()["current_page_id"] = page_id content = AmiCache.getValue(page_id) else: #print "[Site] Site servePage: loading & rendering page and putting in session<br>" content = renderView(current_info, "site_structure") page = Model.Pages.getPageById(page_id) #Append sections to this content = sections.fillSections(current_info, content, page) AmiCache.updateCache(page_id, content) return content