Moved gallery list creation to htmltempl