An alternative to preview in DD4T

DD4T, Tridion, Preview

Quirijn Slings wrote a post about previewing pages using DD4T and a Configuration file.

There is an alternative for configuring previews. In the preview TBB there is a hidden feature (nobody blogged about it I think) that is looking for a metadata variable on the Publication Metadata called "StagingUrl". This variable is used to POST an XML to that url. That way you can preview the page once you added the preview TBB to you page template.

So if you don't have any access to the server, you can still manage to preview the pages from Tridion. Just add the field "StagingUrl" to the publication metadata, add the Preview TBB on your page template and you are good to go.

Also, this way, you can have different preview urls on each publication.

*Note that there is currently a bug in the 1.31 .NET DD4T release (fixed in the repo) that doesn't allow the preview action in the default PageController to recieve XML. *