Git Product home page Git Product logo

breadcrumbs's Issues

Bootstrap changes

http://getbootstrap.com/components/#breadcrumbs
As indicated in the URL above, Bootstrap now uses an ol-element with the class "breadcrumb" (singular) for the breadcrumbs-component. As far as I can tell, there are no config-options for changing the containing html tag in this package.

Do you plan on updating the package so that it is once again Bootstrap-compatible?

Thanks!

suggestion: Add support for chaining 'addCrumb' method.

1️⃣ It should be nice if we can chain methods like:

<?php
$breadcrumbs->addCrumb('Home', '/')
    ->addCrumb('Pages', 'pages')
    ->addCrumb('Subpage', 'subpage')
    ->addCrumb('Subsubpage', '/subsubpage')
    ->addCrumb('Other website', 'http://otherwebsite.com/some-page');
?>

I think is not hard to implement, it just need return $this in addCrumb method.

2️⃣ And, maybe, refactorize addCrumb name to add (shortest name) or add it as an alias:

<?php
$breadcrumbs->add('Home', '/')
    ->add('Pages', 'pages')
    ->add('Subpage', 'subpage')
    ->add('Subsubpage', '/subsubpage')
    ->add('Other website', 'http://otherwebsite.com/some-page');
?>

Add config file support for Laravel

We should have a config file where some default stuff like the listElement can be configured, and the service provider will automatically set that on the shared instance, so that the users may change this stuff via a configuration setting, rather than having to manually set it in code.

List Item Classes and Bootstrap 4

Hi,

There is currently no way to configure classes for list items generated breadcrumbs. I don't think a PR is needed, but if your goal is to support bootstrap or other css frameworks, it might be helpful to add a setListItemClass method similar to setCssClasses so that you can add default classes to the actual list breadcrumb li's.

For example, bootstrap 4 uses the following markup:

<ol class="breadcrumb">
  <li class="breadcrumb-item"><a href="#">Home</a></li>
  <li class="breadcrumb-item"><a href="#">Library</a></li>
  <li class="breadcrumb-item active">Data</li>
</ol>

Currently, the only class that is added to li's is active. I've manually added breadcrumb-item in my copy of this, but I think others would appreciate this as an option.

Mention microdata markup support

Currently, the microdata markup generated thanks to #15 isn't mentioned anywhere in the documentation - but it would probably be useful for people to know about it, so we should add it somewhere to the README file.

Update defaults for Twitter Bootstrap 3

When this library was created, Twitter Bootstrap was at version 2, so the default divider element / was used. Twitter Bootstrap 3 uses pseudo elements for this, so it's not needed anymore, and should default to null (so it isn't even rendered at all). We should also update the default breadcrumbs class to be just breadcrumb instead (which is the Bootstrap class in both 2 and 3 - not sure why we didn't use that from the start).

In fact, since pseudo-elements are the "correct" way to do this (there's nothing semantic about having a divider in HTML, at least in my opinion), we should likely just remove the divider functionality.

As both of these (removing dividers and changing the default CSS class) are BC breaks, we won't do this before v4.0.0. Not sure when that's gonna happen, but I'll let this issue stay here so we don't forget about it.

If anyone has any input on this (or a good argument on why it shouldn't be done), feel free to comment!

http://schema.org/BreadcrumbList to "https"

Hello,

In the render() method, we find http and not https. Could you modify or can we override the method and how?

Thanks

public function render()
    {
        if (empty($this->breadcrumbs)) {
            return '';
        }

        $cssClasses = implode(' ', $this->breadcrumbsCssClasses);

        return '<'. $this->listElement . ' itemscope itemtype="http://schema.org/BreadcrumbList"'
                .' class="' . $cssClasses .'">'
                . $this->renderCrumbs()
                . '</'. $this->listElement .'>';
    }

Laravel 5.0

Problem 1

  • Installation request for creitive/breadcrumbs dev-master -> satisfiable by creitive/breadcrumbs[dev-master].
  • Conclusion: remove laravel/framework 5.0.x-dev
  • creitive/breadcrumbs dev-master requires illuminate/support 4.x -> satisfiable by illuminate/support[4.0.x-dev, 4.1.x-dev, 4.2.x-dev].
  • don't install illuminate/support 4.0.x-dev|don't install laravel/framework 5.0.x-dev
  • don't install illuminate/support 4.1.x-dev|don't install laravel/framework 5.0.x-dev
  • don't install illuminate/support 4.2.x-dev|don't install laravel/framework 5.0.x-dev
  • Installation request for laravel/framework ~5.0 -> satisfiable by laravel/framework[5.0.x-dev].

"Best Practices" for using this add on?

It would be helpful to show some simple "Best Practices" for using this plugin. I think I understand, in general, how it works, but it would be nice to see where the obvious places to put the components are. At least, it's not obvious to me where to put them.

I'm looking for where to place them to minimize duplication of code and simplify build-out.

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.