2017 © Pedro Peláez
 

cakephp-plugin markup

CakePHP view helper to construct HTML easily

image

tkyk/markup

CakePHP view helper to construct HTML easily

  • Friday, December 28, 2012
  • by tkyk
  • Repository
  • 2 Watchers
  • 10 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

CakePHP Markup Helper

MarkupHelper allows you to build complex (X)HTML by fluent interface., (*1)

echo $this->Markup->div('class1')
    ->p->text('Hello world')->end
    ->end;

Requirements

  • PHP 5.2.8 or later
  • CakePHP 2.0

Installation

cd app/Plugin/
git clone git://github.com/tkyk/cakephp-markup-helper Markup

I recommend you to checkout a versioning tag rather than a development branch., (*2)

cd app/Plugin/Markup
git checkout x.y.z.w

Usage

Load Markup.Markup in your controllers., (*3)

class AppController extends Controller {
    public $helpers = array('Markup.Markup');
}

And then, you can write (X)HTML with method chaining., (*4)

echo $this->Markup->div('class1')
    ->p->text('Hello world')->end
    ->end;

Other helpers methods are also available in method chains., (*5)

//The prefix f_ is FormHelper, h_ is HtmlHelper,
//and <HelperName>_ is <HelperName>Helper.
echo $this->Markup
    ->f_create('Post')
    ->f_input('username')
    ->f_input('password')
    ->h_link('Forget password?', array('action' => 'forget'))
    ->f_end('Login')
    ->div('news')
    ->Paginator_numbers()
    ->enddiv;

Check Syntax Guide for more details about the plugin syntax., (*6)

The Versions

28/12 2012

dev-master

9999999-dev https://github.com/tkyk/cakephp-markup-helper

CakePHP view helper to construct HTML easily

  Sources   Download

MIT

The Requires

 

by Takayuki Miwa

cakephp

28/12 2012

v2.0.0

2.0.0.0 https://github.com/tkyk/cakephp-markup-helper

CakePHP view helper to construct HTML easily

  Sources   Download

MIT

The Requires

 

by Takayuki Miwa

cakephp