add sibling pages to context
This commit is contained in:
		
							parent
							
								
									9d424d91f2
								
							
						
					
					
						commit
						b20c348d57
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		| 
						 | 
					@ -7,7 +7,9 @@ from cms.models import Page
 | 
				
			||||||
def page(request, slug):
 | 
					def page(request, slug):
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    page = Page.objects.get(path=slug)
 | 
					    page = Page.objects.get(path=slug)
 | 
				
			||||||
 | 
					    siblings = page.get_siblings(include_self=True)
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    return render_to_response("cms/page_detail.html", {
 | 
					    return render_to_response("cms/page_detail.html", {
 | 
				
			||||||
        "page": page,
 | 
					        "page": page,
 | 
				
			||||||
 | 
					        "siblings": siblings,
 | 
				
			||||||
    }, context_instance=RequestContext(request))
 | 
					    }, context_instance=RequestContext(request))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue