Adds partial page loading using ajax

Installs: 8

Dependents: 0

Suggesters: 0

Security: 0

Stars: 7

Watchers: 6

Forks: 1

Open Issues: 0



1.0.2 2018-02-10 03:30 UTC

This package is auto-updated.

Last update: 2024-04-29 02:26:00 UTC



This module is no longer actively maintained, however, if you're interested in adopting it, please let us know!

Pagejax module for SilverStripe

Adds partial page loading using ajax.


Follow the standard SilverStripe module installation procedure


You must have jquery included in your page


Cuurently we need to modify Page_Controller and add the following method

	public function getViewer($action) {
        $viewer = parent::getViewer($action);
		$this->extend('updateViewer', $action, $viewer);
        return $viewer;

Modify your main template and change



	<div class="pagejax-container">$Layout</div>

Then, any link you want to loaded internally needs to have the pagejax class applied, ie

	<a href="some/internal/page" class="pagejax">Internal page</a>

To customise the way the page transitions in and out, you can bind to the window.pagejaxStart and window.pagejaxComplete events, eg

	$(window).bind('pagejaxStart', function () { });

To change the page title on each refresh, specify an ajaxTitle() method on your Page_Controller class; otherwise, the page title will not be chanaged.

The module does take into account CSS and JS added using Requirements:: by parsing out relevant headers