When editing a video, you must work with its master version. To modify a video, perform the following:
Get the master version. Get the master version of the video. When you modify a video, you must not work on its live version.
Get a temp version. Check out the master version to get a temp version of the video.
Modify the temp version. Set the properties of the temp version to the new values. You can also upload new video data.
Update the master version. Check in the temp version to transfer the changes to the master version.
Update the live version. Publish the master version to transfer the changes to the live version.
EXAMPLE: Modifying a video by the ID of its master version. The example below shows you how to modify a video by the ID of its master version. For more information about working with the ID of the live version, see For developers: Edit content in For developers: Content lifecycle. The following code modifies a video by the ID of its master version.
ID
Native API
First, you get an instance of the LibrariesManager class. Then, you get the master version with the specified ID. Then, to get a temp version of the video, you call Lifecycle.CheckOut with the master version as an argument. You make all the modifications to the temp version. In this example, you update the title of the blog post and respectively its URL and upload new video data. Then, to transfer the changes to the master version, you call Lifecycle.CheckIn with the temp version as an argument. By default, when calling the CheckInmethod the temp version gets deleted. To persist the changes, you call SaveChanges. Finally, to publish the master version, you call the MessageWorkflow method of the WorkflowManager class and pass the required parameters.
LibrariesManager
temp
Lifecycle.CheckOut
Lifecycle.CheckIn
CheckInmethod
SaveChanges
MessageWorkflow
WorkflowManager
Fluent API
First, you check whether a video with the specified ID exists. Then, you get the singular video facade of the master version with the specified ID. Then, to get the facade for the temp version, you call the CheckOut method. You make all the modifications in the Do method of the temp facade. In this example, you update the title of the blog post and respectively its URL. To upload new video data, you call the UploadContent. Then, to transfer the changes to the master version of the video, you call CheckIn. To save the changes, you call SaveChanges. Finally, to publish the video, you call the MessageWorkflow method of the WorkflowManager class and pass the required parameters.
CheckOut
Do
UploadContent
CheckIn
Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.
This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.
This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.
The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important