Download the PHP package luketowers/oc-easyspa-plugin without Composer

On this page you can find all versions of the php package luketowers/oc-easyspa-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package oc-easyspa-plugin

About

Adds Single Page Application like features to the OctoberCMS frontend using the OctoberCMS AJAX framework. More specifically, it enables (through the adding of a component to your layout) loading and updating page content through AJAX.

Requirements

This plugin requires the Ajax Framework to be included in your layout/page in order to handle requests.

Current Support

Only loading new pages (Static Pages or CMS Pages, any URL that is controlled by the CMS) is currently supported. Components on dynamically loaded pages will also work, and assets will be dynamically added and removed as required.

Installation

To install from the Marketplace, click on the "Add to Project" button and then select the project you wish to add it to before updating the project to pull in the plugin.

To install from the backend, go to Settings -> Updates & Plugins -> Install Plugins and then search for LukeTowers.EasySPA.

To install from the repository, clone it into plugins/luketowers/easyspa and then run composer update from your project root in order to pull in the dependencies.

To install it with Composer, run composer require luketowers/oc-easyspa-plugin from your project root.

Usage

To use this plugin, simply attach the [easySPA] component to any layouts that you want to be able to have their pages loaded over AJAX. The loader needs to be attached to an element on the page that contains anchor tags with the URLs to the pages that are to be loaded. This is done by adding the data-control="easy-spa-loader" attribute onto the containing element. There is also an optional attribute data-refresh-partials that can be used to define additional partials that should be refreshed when the page is load in the form of partialPath1:#partialSelector1 with additional partials appended with an & symbol.

Example Layout:

Use Of Third-party/Custom Javascript

Since this plugin uses the Ajax framework to dynamically make changes to the DOM, not all third-party Javascript libraries/scripts may work properly when a page is updated. This is because many of these scripts rely on the $(document).ready event or $(window).load which is not triggered during an ajax update. If you have scripts like this, you may need to re-instantiate some Javascript objects in your code using a $(document).render event listener.

Example (with fake third-party libraries):

Note: The script file with your $(document).render event listener must be included (script tag) after {% framework extras %} to work properly.


All versions of oc-easyspa-plugin with dependencies

PHP Build Version
Package Version
Requires composer/installers Version ~1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package luketowers/oc-easyspa-plugin contains the following files

Loading the files please wait ....