Add sidebar support to gallery page template