updates gallery widget to allow for multiple galleries on a page