2017 © Pedro Peláez
 

cakephp-plugin cakephp-html-tidy-plugin

CakePHP HTML Tidy Plugin

image

cikorka/cakephp-html-tidy-plugin

CakePHP HTML Tidy Plugin

  • Sunday, July 27, 2014
  • by spandansingh
  • Repository
  • 1 Watchers
  • 0 Stars
  • 50 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

CakePHP-HTML-Tidy-Plugin

HTML Tidy Plugin validate and generate tided HTML output, (*1)

Install and Setup

  • First clone the repository into your app/Plugin/Tidy directory, (*2)

    git clone git@github.com:cikorka/CakePHP-HTML-Tidy-Plugin.git app/Plugin/Tidy
    
    cd Plugin/Tidy
    git submodule init
    git submodule update
    
    cd Vendor/tidy-html5
    
    make -C build/gmake/
    sudo make install -C build/gmake/
  • Load the plugin in your app/Config/bootstrap.php file:, (*3)

    //app/Config/bootstrap.php
    CakePlugin::load('Tidy');
  • Add component in app/Controller/AppController.php file:, (*4)

    //app/Controller/AppController.php
    public $components = array('Tidy.Tidy');
    
    // if you want minify HTML code
    public $components = array('Tidy.Tidy' => array('minify' => true));
    
    // if you want minify HTML code and disable CSS and JS minification
    public $components = array('Tidy.Tidy' => array('minify' => true, 'js' => false, 'css' => false));
  • Add behavior in app/Model/YourModel.php file:, (*5)

    //If you want use Tidy and optional Minify fileds content before save into db
    public $actsAs = array('Tidy.Tidy' => array('field_name' => array('minify' => true)));

The Versions

27/07 2014

dev-master

9999999-dev https://github.com/cikorka/CakePHP-HTML-Tidy-Plugin

CakePHP HTML Tidy Plugin

  Sources   Download

The Requires

 

by Cikorka

cakephp tidy html