Add the parameters to the preview link, remove themeId and environment
if they are null.
Merge pull request #616 from fmoloney/SampleFrameworkFix

Add the parameters to the preview link, remove themeId and environment