diff --git a/src/Models/BaseElement.php b/src/Models/BaseElement.php index bb1c6179..b31aff33 100644 --- a/src/Models/BaseElement.php +++ b/src/Models/BaseElement.php @@ -1261,11 +1261,12 @@ public function TotalItems() /** * Returns the position of the current element. * + * @param int $startIndex Number to start count from. * @return int */ - public function Pos() + public function Pos($startIndex = 1) { - return ($this->Parent()->Elements()->filter('Sort:LessThan', $this->Sort)->count() + 1); + return ($this->Parent()->Elements()->filter('Sort:LessThan', $this->Sort)->count() + $startIndex); } /**