def get_context(self): if self.doc.slideshow: from website.doctype.website_slideshow.website_slideshow import get_slideshow get_slideshow(self) self.doc.meta_description = self.doc.description
def get_context(self): from selling.utils.product import get_parent_item_groups self.parent_groups = get_parent_item_groups(self.doc.item_group) + [{"name":self.doc.name}] self.doc.title = self.doc.item_name if self.doc.slideshow: from website.doctype.website_slideshow.website_slideshow import get_slideshow get_slideshow(self)
def get_context(self): from selling.utils.product import get_parent_item_groups self.parent_groups = get_parent_item_groups(self.doc.item_group) + [{ "name": self.doc.name }] self.doc.title = self.doc.item_name if self.doc.slideshow: from website.doctype.website_slideshow.website_slideshow import get_slideshow get_slideshow(self)
def get_context(self): if self.doc.slideshow: from website.doctype.website_slideshow.website_slideshow import get_slideshow get_slideshow(self) self.doc.meta_description = self.doc.description self.doc.breadcrumbs = self.get_breadcrumbs() self.doc.toc_list = self.get_toc_list() # parent, child, next sibling links self.doc.links = self.get_navigation_links() if self.doc.enable_comments: self.doc.comment_list = webnotes.conn.sql("""select comment, comment_by_fullname, creation from `tabComment` where comment_doctype="Web Page" and comment_docname=%s order by creation""", self.doc.name, as_dict=1) or []
def get_context(self): from selling.utils.product import get_product_list_for_group, \ get_parent_item_groups, get_group_item_count self.doc.sub_groups = webnotes.conn.sql("""select name, page_name from `tabItem Group` where parent_item_group=%s and ifnull(show_in_website,0)=1""", self.doc.name, as_dict=1) for d in self.doc.sub_groups: d.count = get_group_item_count(d.name) self.doc.items = get_product_list_for_group(product_group = self.doc.name, limit=100) self.parent_groups = get_parent_item_groups(self.doc.name) self.doc.title = self.doc.name if self.doc.slideshow: from website.doctype.website_slideshow.website_slideshow import get_slideshow get_slideshow(self)
def get_context(self): from selling.utils.product import get_product_list_for_group, \ get_parent_item_groups, get_group_item_count self.doc.sub_groups = webnotes.conn.sql("""select name, page_name from `tabItem Group` where parent_item_group=%s and ifnull(show_in_website,0)=1""", self.doc.name, as_dict=1) for d in self.doc.sub_groups: d.count = get_group_item_count(d.name) self.doc.items = get_product_list_for_group( product_group=self.doc.name, limit=100) self.parent_groups = get_parent_item_groups(self.doc.name) self.doc.title = self.doc.name if self.doc.slideshow: from website.doctype.website_slideshow.website_slideshow import get_slideshow get_slideshow(self)
def get_context(self): if self.doc.slideshow: from website.doctype.website_slideshow.website_slideshow import get_slideshow get_slideshow(self) self.doc.meta_description = self.doc.description