def __init__(self, request, context): self.request = request self.context = context # Get preferences pref_form = BreadcumbPrefForm() self.pref_data = pref_form.get_preferences() # Get all pages back to the root page as a list self.linklist = PageTree.objects.get_backlist(request)
def render(self): # Get preferences pref_form = BreadcumbPrefForm() pref_data = pref_form.get_preferences() # Get all pages back to the root page as a list linklist = PageTree.objects.get_backlist(self.request) linklist += self.linklist context = { "preferences": pref_data, "linklist": linklist, } return render_to_response('breadcrumb/breadcrumb.html', context, context_instance=RequestContext(self.request) )
def render(self): # Get preferences pref_form = BreadcumbPrefForm() pref_data = pref_form.get_preferences() # Get all pages back to the root page as a list linklist = PageTree.objects.get_backlist(self.request) linklist += self.linklist context = { "preferences": pref_data, "linklist": linklist, } return render_to_response('breadcrumb/breadcrumb.html', context, context_instance=RequestContext( self.request))