Giter VIP home page Giter VIP logo

cakephp3-bootstrap-helpers's Introduction

CakePHP 3.x Helpers for Bootstrap

Software License Travis Packagist

CakePHP 3.x Helpers to generate HTML with @Twitter Boostrap style: Breadcrumbs, Flash, Form, Html, Modal, Navbar, Panel and Paginator helpers available!

How to... ?

Installation

If you want the latest Bootstrap 3 version of the plugin:

  • Add the plugin to your composer.json (see below if you want to use another branch / version):
composer require holt59/cakephp3-bootstrap-helpers:dev-master
  • Load the plugin in your config/bootstrap.php:
Plugin::load('Bootstrap');
$this->loadHelper('Html', [
    'className' => 'Bootstrap.Html',
    // Other configuration options...
]);

The full plugin documentation is available at https://holt59.github.io/cakephp3-bootstrap-helpers/.

Migrating to the latest version (>= 3.1.0)? Check the migration guide below!

Table of version and requirements

Version Bootstrap version CakePHP version Information
master 3 >= 3.4.0 Current active branch.
> 3.0.5, <= 3.1.1 3 >= 3.2.3, < 3.4.0 Bug will be fixed (latest version only).
<= 3.0.5 3 >= 3.0.0 Not actively maintained (open issues if necessary).
4.0.0-alpha 4 N/A Outdated, do not use.
4.0.1-alpha 4 >= 3.4.0 Coming soon...

Contributing

Do not hesitate to post a github issue or submit a pull request if you find a bug or want a new feature.

Version 3.1 of the helpers is out!

A new major version 3.1 of the helpers is now out. This version brings major changes to the way helpers internally works by using templates instead of the standard tag() and div() method.

Changes

  • Most methods are now based on templates, meaning that:
    • Options like tag, aria-*, data-*, ..., have been dropped from various methods.
    • The templateVars options is now usable with most methods.
    • There might be escaping issue since the old div() and tag() methods did not escape content be default, while the template based methods do. Feel free to open an issue if you encounter problems with escaping.

Some minor changes that do not impact the user interface:

  • The BootstrapTrait class has been split in two classes: ClassTrait and EasyIconTrait.
  • The test cases have been updated and strenghten to avoid bad modification in the code.

Migrating to 3.1

List of changes that need refactoring in your code:

  • BootstrapHtmlHelper
    • The faIcon and glIcon have been dropped.
    • The useFontAwesome options has been dropped, the new way is to customize the icon template.
    • It is no longer possible to use custom tag to render labels, badges, alerts (still possible for tooltip).
  • BootstrapNavbarHelper
    • The autoButtonLink options has been dropped, this was misleading for many users.

Some options such as aria-*, data-*, have been dropped from various methods since these are now included in the templates, if you want to customize them, you should modify the template.

Who is using it?

Non-exhaustive list of projects using these helpers, if you want to be in this list, do not hesitate to email me or post a comment on this issue.

Copyright and license

The MIT License (MIT)

Copyright (c) 2013-2017, Mikaël Capelle.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

See LICENSE.

cakephp3-bootstrap-helpers's People

Contributors

fullybaked avatar grouse avatar holt59 avatar innovaweb-dev avatar jmenges avatar keraf avatar lyz452 avatar marciobds avatar oxicode avatar raul338 avatar wreality avatar ypnos avatar ypnos-web avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.