Display of Version Number for Widgets.

Topics: Administration, Core
Aug 11, 2015 at 3:32 PM
Currently Iam Working on the Version Management of Contents/Widgets & Media Files. This is about the maintance of Version Numbers when ever administrator of the website make any chnages to the contents/Widget/Media Files. To achive this we got a module "Version Manager" which servses the purpose for contents, we had modified the code through which we can able to achive this for widgets.I have a problem while displaying the widgets since the sterotype for widgets is set as widget in the Content List Iam not able to display the Version Number. Please suggest me ideas how to display the Version numbers for Widgets.

Sunil M.R.
Aug 11, 2015 at 3:58 PM
If you have a reference to a content item, you can access the version number like this:
// Sample code to get a widget from the database:
var myWidget = _contentManager.Get(someWidgetId);
var version = myWidget.Version;