Giter VIP home page Giter VIP logo

twbs-cake-plugin's Issues

question about customization

In the default template there is this code:

<?php if ($this->fetch('navbar.top')): ?>
            <nav role="navigation" class="collapse navbar-collapse" id="navbar-top">
                <ul class="nav navbar-nav">
                    <?= $this->fetch('navbar.top'); ?>
                </ul>
            </nav>
<?php endif; ?>

I've searched and searched through cakephp documentation and I'm not seeing the best way to create a default navbar.top value. I understand $this->extend(), but with my tests so far you can't seem to extend a layout with another layout. So trying to do something like $this->extend('/Layout/default'); doesn't work. If there was like if element exists type of code in your default layout, that would seem to be idea, but since that's not what it is... I'm just wondering what do you consider the best practice for creating a default navbar using your default layout?

Baking views doesn't generate Bootstrap html

I'm running CakePHP 3.0rc1, I had to modify the command to say "--theme" instead of "--template".

Example:

bin/cake bake view tasks --theme Bootstrap

The resulting files are identical to the standard bake output.

Paginator numbers location error

  • BootstrapUI Version: 0.62

I baked the index and the Paginator->Numbers was not between "First and Last".

The code for PaginatorHelper is:
public function numbers(array $options = [])
{
$class = 'pagination';
$options += [
'class' => $class,
'after' => '',
'size' => null,
];
$options['class'] = implode(' ', (array)$options['class']);
if (!empty($options['size'])) {
$options['class'] .= " {$class}-{$options['size']}";
}
$options += [
'before' => '

    ',
    ];

    To fix it I did:
    public function numbers(array $options = [])
    {
    $class = 'pagination';
    $options += [
    'class' => $class,
    //'after' => '

',
'size' => null,
];
$options['class'] = implode(' ', (array)$options['class']);
if (!empty($options['size'])) {
$options['class'] .= " {$class}-{$options['size']}";
}
$options += [
//'before' => '
    ',
    ];

Move less logic to a new plugin

All the less related files (like the helper and the parsers) may be in a separated plugin so other people can use it alone, without all that twitter bootstrap related files.

Flash error

Hi!
I'm using the newest version (RC1) of CakePHP. I'm getting on every view this error message:

Warning (512): Method Cake\View\Helper\SessionHelper::flash does not exist [CORE/src/View/Helper.php, line 138]

I changed this line: <?= $this->Session->flash(); ?> to <?= $this->Flash->render() ?> but it doesn't seems to be resolved:

Notice (8): Undefined variable: class [ROOT/plugins/Bootstrap/src/Template/Element/flash.ctp, line 3]" role="alert"> ×Close The user has been saved.

Use FriendsOfCakePHP/Bootstrap-UI helpers

Instead of developing my own helpers, I'm gonna add the bootstrap-ui helpers and extend them to add the default functionalities of my current classes (like adding some classes by default).

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.