IPublishingTargetPublish Method |
Performs a publish on this publishing target, including all Pages marked on this target as candidates to be published.
For a non-Transform-on-publish target, this action creates XML files for pages and components marked for this target; generates all metadata files needed for the Dynamic Site Server; and copies all updated assets.
For a Transform-on-publish target, Pages will be fully expanded and XSLT transformed, then saved to target folder in a structural format. Updated assets are also copied.
Namespace: Ingeniux.CMS
void Publish( bool incremental = true, bool replicate = true, IEnumerable<IDependencyNode> selectedDependencies = null )
Exception | Condition |
---|---|
InvalidOperationException | When this Publishing Target is retrieved via a Read-only Session. |
[!:System.SecurityException] | When current user doesn't have the permission to perform a publish; when the current user can't access this publishing target; or when performing an incremental publish and the current user doesn't have permision to incrementally publish. |
XmlException | When any XSLT style sheet failed to load as an XML document. |
This method is in charge of handling the task that performs the actual publishes. It does not wait for the publish to finish.
All publish tasks are pushed into a queue and executed in sequence.
Incremental publishes will detect if any pages were changed (checked in, marked for publish changes, etc.), since the last publish. If no pages have changed since the last publish, an error is thrown.
A full publish first cleans up the target folder by deleting all files and directories.
If the current user doesn't have access to this publishing target, a publish doesn't happen and an error log entry is written to the design-time log.
All XSLT style sheets in the "xml/Stylesheets" folder are validated during publish.
The event BeforePublish is fired prior to creating a Publishing Task.
The event BeforePublish is fired after a Publishing Task completes the actual publish, not after the Publishing Task is created.