In our new project we are starting to use dB publishing and I’ve encountered a conundrum that I thought someone in the community might have an idea on.
We have a UAT state in our workflow which serves as an approval state (once item is published to UAT web server, end-users approve it) (we do not manage approvals through CMS, but use other process). Edition to this UAT web server also includes all already Public items, so that the complete website is present for review.
For our Production site we will publish a regular page (first template) and also a dB entry (second template) to our Production database.
Is it possible to switch the db.resource on a db publish template to redirect the publish to UAT database based on the item’s state?
Since Edition to UAT web server also includes Public items it seems that there is no other way to this but create additional templates and content list to handle UAT publishing.
Any ideas and suggestions are welcome,
Define a site/context variable on your Publishing Design tab for each of your Prod and UAT sites (or your prod and UAT contexts) that contains the JNDI Connection Name of the database to which you will be publishing. (This hinges on the tables in both databases being identical) For the sake of argument, I’m going to assume you use the name “pub_db”
Remove your old bindings for $db.origin, $db.datasource, $db.drivertype and $db.database
Add the following bindings to replace the ones you’ve removed: