elboletaire / twbs-cake-plugin Goto Github PK
View Code? Open in Web Editor NEW:cake: Twitter Bootstrap Plugin for CakePHP 3 with bundled less.php parser, helpers and bake templates
License: MIT License
:cake: Twitter Bootstrap Plugin for CakePHP 3 with bundled less.php parser, helpers and bake templates
License: MIT License
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?
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.
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' => '
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.
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.
I've tried installing the command line "composer require ...", and by just manually adding it to my composer.json file and running "composer update". Either way I get the same error : https://www.evernote.com/shard/s13/sh/2f86eadb-0f01-4463-9201-cc54a8bd50f5/833c05c016fc09a7a8d758df4f783157
I'm using
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).
We need a SASS parser and a Sass helper to get everything working with Bootstrap 4!
I don't like the leafo's version (that's why I changed from leafo's lessphp to oyejorge's one), so let's try to find an alternative.
Here's a nice alternative:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.