Alchemy Plugin: DXA Page Preview


The Alchemy DXA Page Preview plugin allows you to preview a DXA page inside the CME without publishing the page to the content delivery server.

The standard page preview of a DXA page is not particularly useful to a content editor:

Oooh, look at the raw text dump.

Not particularly useful for a content editor.

The DXA plugin adds an additional item to a page’s context menu, “Preview Page in DXA” and shows a preview window that is actually representative of the DXA website.

DXA plugin menu and preview window

That’s more like it!

Set Up

The plugin requires that you are running a DXA website with network access to the Tridion core service. The DXA website must also be able to run as an impersonation user with access to the CME.

First install the Alchemy DXA plugin.

Next set up your DXA website. You can either modify an existing staging website that has network access with a CME impersonation user to the Tridion Core Service or create a new DXA website in your preview environment. If you go down the later path you can add a “Preview” publishing target if you want to be able to push out updates to your DXA website through the CME though this isn’t needed.

The DXA preview plugin requires a customised “DD4T.Providers.SDLTridion2013.dll” that you can download here. This DLL replaces the standard DXA DD4T.Providers.SDLTridion2013.dll in your DXA website and renders your page using content and templates pulled from the Tridion Core Service and the Content Delivery Database for other dynamic content on the page. The DXA preview functionality will only be activated if the “?preview=true” flag is passed to the website otherwise the website pulls dynamic content from the content delivery database as normal.

Once you have the plugin installed and your DXA website up and running you just need to update the a4t.xml file on your CME at %TRIDION_HOME%\web\Alchemy\Plugins\DXA_Page_Preview\a4t.xml.

Update the DXAPreviewApplicationUrl setting with the URL of your DXA preview application that you just set up.



And that’s it, you’re good to go. Enjoy previewing your DXA pages in all their non-published glory.

6 thoughts on “Alchemy Plugin: DXA Page Preview

  1. Pingback: Introducing My First Alchemy Plugin, WhereUsedPlus | SDL Tridion Developer

  2. Nice work, how about submitting your changes to DXA as a pull request so we can actaully look at incorporating them into the next release?

  3. Works well. One question (and I may have missded something), is there a way of setting a different DxaPreviewApplicationUrl for each publication?

  4. Hey Andy, there isn’t currently a way of doing this though I agree it would be nice to have. I believe there is a way to use repeatable fields in the alchemy plugin configuration so I’m going to take a look at adding this feature.

  5. No worries Mark. I hacked it to use an appropriate URL based on publication TCM Id. Should be able to do it through configuration, but as it was just a demo I never got around to it.

  6. Pingback: DXA Preview Plugin for DXA 1.2 and SDL Tridion 2013 SP1 – Ryan Durkin's Blog

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>