Skip to content

Commit

Permalink
Only display body when requesting page through fancyBox.
Browse files Browse the repository at this point in the history
  • Loading branch information
julen committed Mar 23, 2012
1 parent a14faf2 commit bd219cc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion local_apps/legalpages/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.