This site is not optimized for your current browser (Internet Explorer 6). The site is usable, but you may encounter visual errors. Please use a more modern version of any browser.

matt.toigo

WHY CONSUME WHEN YOU CAN CREATE?

Crumbum

Crumbum is an Expressione Engine plugin (compatible with EE2 and 1) that automatically generates breadcrumbs in your templates based on the URL structure of entries managed by the Expression Engine Pages Module. It can be easily configured to meet the needs of your website and can be downloaded here.

Example Breadcrumbs

The breadcrumbs below would be generated for a page at a URL such as: /about/staff/web/matt assuming that all of the pages in the hierarchy such as about, staff, and web exist as well.

Crumbs

Table of Contents

Documentation

Using Crumbum

To use Crumbum simply add the tag {exp:crumbum:crumbs} to one of your templates (there is no closing tag). This should be a template that you use for entries that are managed by the Expression Engine Pages Module. The tag will be replaced with breadcrumbs when your page is rendered. There are various parameters below to customize the output of the tag.

Parameters

All of the arguments below are optional, but may be required for Crumbum to function properly depending on how you have Expression Engine configured.

If you are using Expression Engine 1, then the terminology (channel -> weblog) and screenshots below change slightly, but still make sense.

short_name

{exp:crumbum:crumbs short_name="pages_channel_name"}

This is a tag to specify the channel that Crumbum should look in to find the titles and addresses for breadcrumb links. This should be the short name of the channel. To find the short name of a channel go to Admin -> Channel Administration -> Channels.

Channels
EE1 Screenshot

Your channels will be listed here with the short name for each. If you leave this blank, Crumbum will assume that this channel is the one you have set in Modules -> Pages -> Module Configuration for Default Channel for 'Create New Page' Tab.

Pages Module
EE1 Screenshot

There is also a slight performance advantage in specifying this rather than having it be automatically determined.

list_home

{exp:crumbum:crumbs list_home="yes|no"}

This option determines whether or not to start a breadcrumb string with a link to your homepage. Your homepage URL will try to be determined, but if you want to override the URL for this link, use the home_url argument below. It should be passed yes or no. The default is yes.

home_url

{exp:crumbum:crumbs home_url="http://www.yourdomain.com"}

This option determines the URL that the Home link at the beginning of your breadcrumbs links to. This is automatically determined if left blank, but use this argument to override it if it's not correct. If list_home is set to no, then you don't need to worry about this argument.

crumb_char

{exp:crumbum:crumbs crumb_char=" >> "}

This is the character sequence that you want to have between your breadcrumb links including spaces. The default for this is » which renders as » You can also use HTML here to insert an image between each breadcrumb link.

list_current

{exp:crumbum:crumbs list_current="yes|no"}

This parameter determines if the current page should be listed in the bread crumbs. Possible values are yes or no. The default is yes.

link_current

{exp:crumbum:crumbs link_current="yes|no"}

This parameter determines if the breadcrumb for the current page (last one) should be a link. If list_current is set to no, then you don't need to worry about this argument. Possible values are yes or no. The default is no.

debug

{exp:crumbum:crumbs debug="yes"}

If this option is set, debugging information will be displayed before the bread crumbs which can help to troubleshoot any problems. You must be logged in as a Super Admin to see the debugging information.

Example

{exp:crumbum:crumbs list_home="no" crumb_char=" -> " list_current="no"}

The above tag would display a string of breadcrumbs that doesn't display a homepage link, uses -> between the breadcrumbs, and doesn't include the title of the current page in the breadcrumbs. An example of how it would appear is below.

Example

Error Handling

If Crumbum runs into any problems, it will output a red error message in place of breadcrumbs. You must be logged in as a Super Admin to see these error messages. If there is an error and you are not logged in, no breadcrumbs will be produced.

How It Works

Crumbum works by looking at a requested URL and splitting it into chunks for everything after the location of your Expression Engine install. It processes these chunks and determines what page you are looking it. It then grabs the page title and URLs for the current page as well as every page that came before it the structure of the URLs handled by the Pages Module. These URLs and titles are then outputted based on the parameters it was passed.

Download

Requirements

Before downloading this plugin, make sure you have:

  • An install of Expression Engine 2 (tested with 2.1.0 - Build: 20100712) or 1 that has the Pages module enabled. The version number can be determined by clicking Expression Engine Info at the bottom of any page.
  • PHP 5.0 or higher installed on your server. Use the phpinfo() function to determine what version of PHP you are running

Get It

By downloading the file below you agree that Matt Toigo is in no way responsible or legally liable for any issues that may arise related to its installation. You are free to modify this plugin however you please, but you are prohibited from redistributing it or selling it in any form.

Crumbum is being actively developed so please send any bug reports or comments to .(JavaScript must be enabled to view this email address)

Installation

Expression Engine 2

  1. Upload the crumbum folder to your /system/expressionengine/third_party directory. You should end up with a file at /system/expressionengine/third_party/crumbum/pi.crumbum.php
  2. Go to your Expression Engine control panel and then Add-Ons -> Plugins and confirm that you see Crumbum listed there.
  3. Add the tag {exp:crumbum:crumbs} to a template that is used by the Pages Module.
  4. Visit a URL that calls the above template through the Pages Module.
  5. If you aren't seeing any breadcrumbs, you may need to specify a short_name so Crumbum knows what channel to use.

Expression Engine 1

  1. Upload the pi.crumbum.php file to the /system/plugins directory of your Expression Engine install.
  2. Go to your Expression Engine control panel and then Admin -> Utilities -> Plugin Manager and confirm that you see Crumbum listed there.
  3. Add the tag {exp:crumbum:crumbs} to a template that is used by the Pages Module.
  4. Visit a URL that calls the above template through the Pages Module.
  5. If you aren't seeing any breadcrumbs, you may need to specify a short_name so Crumbum knows what weblog to use.

Version Notes

Version 1.4

  • Tested with EE 2.1.0 - Build: 20100712
  • Fixed bug where automatic pages weblog detection wasn't catching an error.

Version 1.3

  • Only the EE2 version of Crumbum will be updated from now on
  • Tested all functionality with 2.0.2 Beta - Build: 20100430 - 7/8/10
  • Works slicker for users who are keeping index.php in their URLs rather than using mod_rewrite
  • Looks out for odd characters passed in as parameters (' " , ;) that could cause SQL injection

Version 1.2

  • Fixed a bug related to EE reworking the pages module in 1.6.9

Version 1.1

  • Added debug parameter to assist in troubleshooting and support.

Version 1.0

  • Initial Release

Support

If you have any questions, comments, or need help, send them to Matt Toigo (me@matt-toigo.com). You can also look for help in the Expression Engine Plugins Forum.