Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Easily support PJAX requests with FuelPHP

branch: master
README.md

use Turbo

fuel-pjax is unsupported


fuel-pjax

Easily support PJAX requests with the same view in FuelPHP.

1) Install by placing the the code in fuel/packages/pjax

2) Add pjax to always_load -> packages in fuel/app/config/config.php

Usage

Wrap any section of your view with the {# PJAX #} tag so for example:

<div class="container">
  {# PJAX #}
  content
  {# PJAX #}
</div>

Fuel will then return content if it is a PJAX request or remove the tag if not. If the <title> tag is found this is also returned to PJAX.

You can also use a seperate file for PJAX requests by appending -pjax to the file. So if you request home it will try and load home-pjax first. For example:

View::forge('home') -> home-pjax.php
Something went wrong with that request. Please try again.