Use Version 2.0 in front end ressources

Hello! Hello @markh !
I would like to add versioning to the frontend of my resources.
In the first step just an info about which version it is, maybe also an info about how many versions exist. Since I try to document the editing progress to my readers, this would be very helpful.

Thanks a lot Thomas

Are you talking about the extra VersionX?

If that is the case, then you should be able to output the version count with a custom snippet that runs an xPDO query:

//add the package
$modx->addPackage('versionx', $modx->getOption('core_path').'components/versionx/model/');
//query the amount of entries in the table for the current resource
return $modx->getCount('vxResource', array('content_id' => $modx->resource->get('id')));
1 Like

Yes, I am talking on VersionX. I have not yet installed it.