Snippets/Preview any page as a template

Description
The Extension:TemplateSandbox extension provides a "Preview page with this template" box on the edit page of any template page (including Lua modules, and TemplateStyles CSS pages). However, if a different page is transcluded or otherwise used elsewhere, then this box does not appear.

This snippet can be used to edit a regular called "Foo", and preview the page "Bar" that transcludes it. For example to preview the output of  as used on page "Bar".