Updated document and sample to include a previewTemplate