diff --git a/dlf/plugins/listview/class.tx_dlf_listview.php b/dlf/plugins/listview/class.tx_dlf_listview.php
index 8e9e3e96..a25ec37b 100644
--- a/dlf/plugins/listview/class.tx_dlf_listview.php
+++ b/dlf/plugins/listview/class.tx_dlf_listview.php
@@ -82,23 +82,59 @@ class tx_dlf_listview extends tx_dlf_plugin {
}
- $output = ($this->piVars['pointer'] > 0 ? $this->pi_linkTP_keepPIvars($this->pi_getLL('firstPage', '<'), array ('pointer' => $this->piVars['pointer'] - 1), TRUE) : $this->pi_getLL('firstPage', '<'));
+ // Get separator.
+ $separator = $this->pi_getLL('separator', ' - ');
- $output .= $this->pi_getLL('separator', ' - ');
+ // Add link to previous page.
+ if ($this->piVars['pointer'] > 0) {
+
+ $output = $this->pi_linkTP_keepPIvars($this->pi_getLL('prevPage', '<'), array ('pointer' => $this->piVars['pointer'] - 1), TRUE).$separator;
+
+ } else {
+
+ $output = $this->pi_getLL('prevPage', '<').$separator;
+
+ }
$i = 0;
while ($i < $maxPages) {
- $output .= ($this->piVars['pointer'] != $i ? $this->pi_linkTP_keepPIvars(sprintf($this->pi_getLL('page', '%d'), $i + 1), array ('pointer' => $i), TRUE) : sprintf($this->pi_getLL('page', '%d'), $i + 1));
+ if ($i < 3 || ($i > $this->piVars['pointer'] - 3 && $i < $this->piVars['pointer'] + 3) || $i > $maxPages - 4) {
- $output .= $this->pi_getLL('separator', ' - ');
+ if ($this->piVars['pointer'] != $i) {
+
+ $output .= $this->pi_linkTP_keepPIvars(sprintf($this->pi_getLL('page', '%d'), $i + 1), array ('pointer' => $i), TRUE).$separator;
+
+ } else {
+
+ $output .= sprintf($this->pi_getLL('page', '%d'), $i + 1).$separator;
+
+ }
+
+ $skip = TRUE;
+
+ } elseif ($skip == TRUE) {
+
+ $output .= $this->pi_getLL('skip', '...').$separator;
+
+ $skip = FALSE;
+
+ }
$i++;
}
- $output .= ($this->piVars['pointer'] < $maxPages - 1 ? $this->pi_linkTP_keepPIvars($this->pi_getLL('lastPage', '>'), array ('pointer' => $this->piVars['pointer'] + 1), TRUE) : $this->pi_getLL('lastPage', '>'));
+ if ($this->piVars['pointer'] < $maxPages - 1) {
+
+ $output .= $this->pi_linkTP_keepPIvars($this->pi_getLL('nextPage', '>'), array ('pointer' => $this->piVars['pointer'] + 1), TRUE);
+
+ } else {
+
+ $output .= $this->pi_getLL('nextPage', '>');
+
+ }
return $output;
diff --git a/dlf/plugins/listview/locallang.xml b/dlf/plugins/listview/locallang.xml
index 8613d6ca..d3ddb5b7 100644
--- a/dlf/plugins/listview/locallang.xml
+++ b/dlf/plugins/listview/locallang.xml
@@ -13,10 +13,11 @@
-
-
+
+
+
@@ -28,10 +29,11 @@
-
-
+
+
+