add preview type parameter to preview helper

Takes a parameter for gallery type to support new plugin architecture.