count page versions / get current version
Permalink
I need to get total page versions for the current page for an if statement based on the number of versions. I've been poking around and haven't come across how to do this. Hopefully someone has a nudge in the right direction for me ?? :)
From concrete/tools/versions.php
$c is the page object
$page is for pagination of the list, so starts at 1 (or maybe 0)
The above is cropped to 20 versions.
$vl = new VersionList($c,20, $page); $total = $vl->getVersionListCount(); $vArray = $vl->getVersionListArray();
$c is the page object
$page is for pagination of the list, so starts at 1 (or maybe 0)
The above is cropped to 20 versions.
the example below demonstrates what i was trying to accomplish. To only post the update event to the wall from site_events.php if the page version is greater than 1 !!
Problem solved!!