Add configurable viewer and page templates

This is useful for anyone who wants to automatically insert content into each page or into the viewer layout.