2017 © Pedro Peláez
 

symfony-bundle pjax-bundle

TcPjaxBundle

image

tc/pjax-bundle

TcPjaxBundle

  • Monday, August 10, 2015
  • by carlcraig
  • Repository
  • 3 Watchers
  • 1 Stars
  • 109 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Tc Pjax Bundle

Latest Stable Version, (*1)

SensioLabsInsight, (*2)

Integrates Pjax to Symfony, (*3)

Installation

composer require tc/pjax-bundle

Enable the bundle in your AppKernel.php, (*4)

$bundles = array(
    // ...

    new Tc\Bundle\Pjax\TcPjaxBundle(),

    // ...
);

Include the scripts in your templates, (*5)





{# OR #}

{% javascripts
 '@TcPjaxBundle/Resources/public/vendor/jquery.js'
 '@TcPjaxBundle/Resources/public/vendor/jquery.pjax.js'
 '@TcPjaxBundle/Resources/public/js/tc-pjax.js'
%}

{% endjavascripts %}

Usage

You will now want to create a pjax container, and different layouts for full and pjax, (*6)

base.html.twig

<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
  <meta charset="utf-8">
  <title>{% block title %}{% endblock %}</title>
</head>
<body>
{% block body %}{% endblock %}
<script src="{{ asset('bundles/tcpjax/vendor/jquery.js') }}"></script>
<script src="{{ asset('bundles/tcpjax/vendor/jquery.pjax.js') }}"></script>
<script src="{{ asset('bundles/tcpjax/js/tc-pjax.js') }}"></script>
</body>
</html>

base-pjax.html.twig

<title>{% block title %}{% endblock %}</title>
{% block body_inner %}{% endblock %}

your-layout.html.twig

{% extends pjax('#your-layout', '::base.html.twig', '::base-pjax.html.twig') %}

{% block title %}Your Title{% endblock %}

{% block body %}

    <div {{ pjaxContainer('#your-layout', app.debug) }}>

    {% block body_inner %}

      <h1>Your Content</h1>

    {% endblock %}

    </div>

{% endblock %}

License

TcPjaxBundle is licensed with the MIT license., (*7)

See LICENSE for more details., (*8)

The Versions

10/08 2015

dev-master

9999999-dev https://github.com/ThreeceeStudios/TcPjaxBundle

TcPjaxBundle

  Sources   Download

MIT

The Requires

 

by Carl Craig

pjax tc pjax-bundle jquery-pjax

10/08 2015

v1.0.2

1.0.2.0 https://github.com/ThreeceeStudios/TcPjaxBundle

TcPjaxBundle

  Sources   Download

MIT

The Requires

 

by Carl Craig

pjax tc pjax-bundle jquery-pjax

14/05 2015

v1.0.1

1.0.1.0 https://github.com/ThreeceeStudios/TcPjaxBundle

TcPjaxBundle

  Sources   Download

MIT

The Requires

 

by Carl Craig

pjax tc pjax-bundle jquery-pjax

08/05 2015

v1.0.0

1.0.0.0 https://github.com/ThreeceeStudios/TcPjaxBundle

TcPjaxBundle

  Sources   Download

MIT

The Requires

 

by Carl Craig

pjax tc pjax-bundle jquery-pjax