| @@ -48,10 +48,10 @@ | ||
| 48 | 48 | */ |
| 49 | 49 | public function __construct(XMLFile $file, $record_path, $args = array()) |
| 50 | 50 | { |
| 51 | 51 | $this->file = $file; |
| 52 | - $this->file->processing(true); | |
| 53 | 52 | $this->record_path = $record_path; |
| 53 | + // Do not enable processing mode — preview navigation needs the full record index. | |
| 54 | 54 | |
| 55 | 55 | if (!empty($record_path) && strpos($record_path, '/') !== false) { |
| 56 | 56 | $this->record_path_parts = explode('/', $record_path); |
| 57 | 57 | |
| @@ -61,12 +61,12 @@ | ||
| 61 | 61 | } |
| 62 | 62 | } |
| 63 | 63 | } |
| 64 | 64 | |
| 65 | - public function data() | |
| 65 | + public function data($record_index = 0) | |
| 66 | 66 | { |
| 67 | 67 | $this->file->setRecordPath($this->record_path); |
| 68 | - $record = $this->file->getRecord(); | |
| 68 | + $record = $this->file->getRecord(intval($record_index)); | |
| 69 | 69 | |
| 70 | 70 | $xml = new \XMLReader(); |
| 71 | 71 | $xml->xml($record); |
| 72 | 72 | |