- return render_to_response('infopages/infopage.html', locals(),
- context_instance=RequestContext(request))
+ return render(
+ request,
+ 'infopages/2022/infopage.html' if new_layout.value else 'infopages/infopage.html',
+ {
+ 'page': page,
+ 'left_column': left_column,
+ 'right_column': right_column,
+ 'active_menu_item': f'info:{slug}',
+ }
+ )