Our current setup is that we have two targets, Staging and Live. Collaborators may update the affected component while it is still within the workflow. A final activity is set to publish the related pages to Live. Is it possible to publish component updates (revisions e.g. 2.2, 2.5) to Staging from within the workflow?
The TOM API documentation for Page.Publish() method does not seem to have an input parameter to fullfil such purpose.
EDIT: Additional details to our current setup: The page we’re trying to publish has a “custom renderer”, so to speak. The page template is setup to pull components from a certain folder recursively and build the HTML accordingly. The method used is Folder.GetItems(OrganizationalItemItemsFilter). It retrieves the list of components together with their data. The page doesn’t have component presentations.
For standard Tridion solutions i.e. using Page+ComponentPresentations+Workflow, this will suffice:
Setting
activateWorkflowparameter toTruein thePublish()method will publish the workflow revision. It’s the 3rd parameter:Reference: TOM API Documentation: “activateWorkflow | Indicates whether the item is being (un-/re-)published from the user’s work list.“
However, if customized renderers are used to build page output, like when using
Folder.GetItems()to retrieve components in templates, additional calls would be required to actually retrieve the latest revision of components such as the version-zero-v0trick by Nuno.Please note that if you decide to do this, the latest revision will always be published to your targets and it may not exactly be “approved” content.