GithubHelp home page GithubHelp logo

philebreadcrumbs's Introduction

PhileBreadcrumbs

A PhileCMS plugin that generates breadcrumbs. The plugin returns an array and adds no markup allowing you to use it how you want.

1. Installation

Install via composer

php composer.phar require gibbs/phile-breadcrumbs:1.*

Install via git

Clone this repository from the phile directory into plugins/gibbs/phileBreadcrumbs. E.g:

git clone [email protected]:Gibbs/phileBreadcrumbs.git plugins/gibbs/phileBreadcrumbs

Manual Install

Download and extract the contents into: plugins/gibbs/phileBreadcrumbs

2. Plugin Activation

Activate the plugin in your config.php file:

$config['plugins']['gibbs\\phileBreadcrumbs'] = array('active' => true);

3. Examples

When the plugin is enabled a breadcrumbs variable becomes available to your themes. The breadcrumbs variable contains the following:

  1. active (true or false). The last item/crumb is true.
  2. meta. The crumbs parsed meta data. You can use any meta data.
  3. uri. The crumbs relative URL.
  4. url. The crumbs absolute URL.

Minimal Example

{% for crumb in breadcrumbs %}
	<a href="{{ crumb.url }}">{{ crumb.meta.title }}</a>
{% endfor %}

Bootstrap 3 Example

<ol class="breadcrumb">
	{% for crumb in breadcrumbs %}
		{% if crumb.active %}
			<li class="active">{{ crumb.meta.title }}</li>
		{% else %}
			<li><a href="{{ crumb.uri }}">{{ crumb.meta.title }}</a></li>
		{% endif %}
	{% endfor %}
</ol>

Foundation 5 Example

<ul class="breadcrumbs">
	{% for crumb in breadcrumbs %}
		{% if crumb.active %}
			<li class="current"><a href="{{ crumb.uri }}">{{ crumb.meta.title }}</a></li>
		{% else %}
			<li><a href="{{ crumb.uri }}">{{ crumb.meta.title }}</a></li>
		{% endif %}
	{% endfor %}
</ul>

Semantic UI Example

<div class="ui breadcrumb">
	{% for crumb in breadcrumbs %}
		{% if crumb.active %}
			<div class="active section">{{ crumb.meta.title }}</div>
		{% else %}
			<a href="{{ crumb.uri }}" class="section">{{ crumb.meta.title }}</a>
			<span class="divider"> / </span>
		{% endif %}
	{% endfor %}
</div>

philebreadcrumbs's People

Contributors

gibbs avatar khanduras avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

khanduras

philebreadcrumbs's Issues

Subdirectory

It seems that phileBreadcrumbs doesn't take into account subdirectory installs.

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.