summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/layout/layout.phtml9
-rw-r--r--app/models/RSSPaginator.php4
2 files changed, 12 insertions, 1 deletions
diff --git a/app/layout/layout.phtml b/app/layout/layout.phtml
index cfbdc4a2e..40afbd85f 100644
--- a/app/layout/layout.phtml
+++ b/app/layout/layout.phtml
@@ -12,7 +12,14 @@
<script>//<![CDATA[
<?php $this->renderHelper ('../javascript/main'); ?>
//]]></script>
- <?php echo self::headScript (); ?>
+<?php
+ $next = isset($this->entryPaginator) ? $this->entryPaginator->next() : '';
+ if (!empty($next)) {
+ $params = Request::params ();
+ $params['next'] = $next;
+?>
+ <link id="prefetch" rel="next prefetch" href="<?php echo Url::display (array ('c' => Request::controllerName (), 'a' => Request::actionName (), 'params' => $params)); ?>" />
+<?php } ?>
</head>
<body>
<?php $this->partial ('header'); ?>
diff --git a/app/models/RSSPaginator.php b/app/models/RSSPaginator.php
index 7010291bc..86b4b5cac 100644
--- a/app/models/RSSPaginator.php
+++ b/app/models/RSSPaginator.php
@@ -19,6 +19,10 @@ class RSSPaginator {
return $this->items;
}
+ public function next () {
+ return $this->next;
+ }
+
public function render ($view, $getteur) {
$view = APP_PATH . '/views/helpers/'.$view;