Permalink
Browse files

Only display body when requesting page through fancyBox.

  • Loading branch information...
1 parent a14faf2 commit bd219cc5cf45a9b2aa49fa3464fbec476a60f344 @julen julen committed Mar 23, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 local_apps/legalpages/views.py
View
6 local_apps/legalpages/views.py
@@ -81,5 +81,9 @@ def legalpage(request, slug):
if lp.url:
return redirect(lp.url)
- return render_to_response('legalpages/legalpage.html', {'lp': lp},
+ template_name = 'legalpages/legalpage.html'
+ if 'HTTP_X_FANCYBOX' in request.META:
+ template_name = 'legalpages/legalpage_body.html'
+
+ return render_to_response(template_name, {'lp': lp},
RequestContext(request))

0 comments on commit bd219cc

Please sign in to comment.