Software Guide

Die besten Tipps, Anleitungen und Downloads

Ihre Werbung auf Software Guide

Sie möchten in dieser Box oder an anderer Stelle dieser Webseiten eine Werbung schalten? Sehen Sie sich dazu am besten einfach mal die verschiedenen Möglichkeiten an.


Breadcrumb Navigation XT

This plugin is no longer supported by me due to lack of time. John Havlik has picked up the development and released a new version with a few modifications. Please check out his plugin page under Breadcrumb Navigation XT & get the latest version there.

Table of Contents

  1. Purpose
  2. Downloads
  3. Installation
  4. Usage
  5. Options
  6. Code Examples for Implementation
  7. Related Plugins
  8. Version History and Changelog

Purpose

PluginBreadcrumb Navigation XT for WordPress 2.0.x and 2.1 adds a breadcrumb navigation to WordPress.

So-called breadcrumb navigations show the visitor’s path to their current location, in the following some examples:
Breadcrumbs
See Wikipedia’s article Breadcrumb Navigation for details. According to the definition of Wikipedia, this plugin is a Location Breadcrumb.
German speaking visitors can take a look at the German Wikipedia article Breadcrumb-Navigation.

Downloads

Installation

Breadcrumb Navigation XT can be installed in 3 easy steps:

  1. Download the plugin (see “Downloads” above).
  2. Decompress the .zip archive and put the file breadcrumb-navigation-xt.php in your plugins directory (/wp-content/plugins/) or in a sub directory of the plugins directory.
  3. Enable the plugin in the WordPress Plugins admin page.

Usage

Open the appropriate file of your theme to add the breadcrumb navigation, in most cases this is header.php or index.php.

Add the following code to the section where you want the plugin to be displayed:

<div class="breadcrumb">
<?php
if (class_exists('breadcrumb_navigation_xt')) {
// Display a prefix
echo 'Navigation: ';
// new breadcrumb object
$mybreadcrumb = new breadcrumb_navigation_xt;
// Display the breadcrumb
$mybreadcrumb->display();
}
?>
</div> <!-- [breadcrumb] -->

That’s it, after saving the file, the breadcrumb navigation is being displayed.

Options

There are various options for this plugin.

Do you have a static frontpage?

  • static_frontpage (default: false): Assuming your WordPress URL is http://www.site.com:
    a) If you have a standard WP installation (www.site.com displays latest 10 posts), use FALSE
    b) If you have a static front page by using a WordPress page at http://www.site.com and your blog is available at http://www.site.com/blog/, use TRUE

Options if static_frontpage = true:

  • url_blog (default: ''): Relative URL for your blog’s address that is used for the Weblog link. Use it if your blog is available at http://www.site.com/myweblog/, and at http://www.site.com/ a WordPress page is being displayed: In this case apply ‘/myweblog/’.
  • home_display (default: true): Display HOME? If set to false, HOME is not being displayed.
  • url_home (default:get_settings('home'), so the blog url acc. to the settings): URL for the home link.
  • home_link (default: true): Apply a link to HOME? If set to false, only plain text is being displayed.
  • title_home (default: 'Home'): Text displayed for the home link, if you don’t want to call it home then just change this. Also, it is being checked if the current page title = this variable. If yes, only the Home link is being displayed, but not a weird “Home / Home” breadcrumb.

More options:

  • title_blog (default: 'Weblog'): Text displayed for the weblog link. If “'static_frontpage' => false”, you might want to change this value to “Home”.
  • separator (default: ' / '): Separator that is placed between each item in the breadcrumb navigation, but not placed before the first and not after the last element. You also can use image tags here.
  • title_search (default: 'Search'): Text displayed for the search page.
  • singleblogpost_prefix (default: 'Blog article: '): Prefix for a single blog article.
  • singleblogpost_suffix (default: ''): Suffix for a single blog article.
  • page_prefix (default: ''): Prefix for a page.
  • page_suffix (default: ''): Suffix for a page.
  • urltitle_prefix (default: 'Browse to: '): The prefix that is used for mouseover link (e.g.: "Browse to: Archive")
  • urltitle_suffix (default: ''): The suffix that is used for mouseover link
  • archive_category_prefix (default: 'Archive by category ''): Prefix for categories.
  • archive_category_suffix (default: ''): Suffix for categories.
  • archive_date_prefix (default: 'Archive: '): Prefix for archive by year/month/day.
  • archive_date_suffix (default: ''): Suffix for archive by year/month/day.
  • tag_page_prefix (default: 'Tag: '): Prefix for tags (Simple Tagging Plugin is required).
  • tag_page_prefix (default: ''): Suffix for tags (Simple Tagging Plugin is required).
  • use404 (default: true): true/false. Apply special title on 404 error page ?
  • title_404 (default: '404'): Text displayed for a 404 error page, only being used if 'use404' => true.
  • link_current_item (default: false): true/false. Display current item as link?
  • current_item_urltitle (default: 'Link of current page (click to refresh)'): URL title of current item, only being used if 'link_current_item' => true.
  • current_item_style_prefix (default: ''): Style or prefix being applied as prefix to current item. E.g. <span class="bc_current">.
  • current_item_style_suffix (default: ''): Style or prefix being applied as suffix to current item. E.g. </span>.
  • posttitle_maxlen (default: 0): You can limit the max no. of characters of the post title to be displayed. This can be useful if you have a limited width for your breadcrumb navigation. 0 = no limit.
  • singleblogpost_category_display (default: false): Display category when displaying single blog post?
  • singleblogpost_category_prefix (default: ''): Prefix for single blog post category, only being used if 'singleblogpost_category_display' => true
  • singleblogpost_category_suffix (default: ''): Suffix for single blog post category, only being used if 'singleblogpost_category_display' => true

OK, these are many options. Don’t be scared, all default values are defined. They are here just in case you want to adjust something. In the following an example of 2 options being applied to the plugin:

<div class="breadcrumb">
<?php
if (class_exists('breadcrumb_navigation_xt')) {
// Display a prefix
echo 'Navigation: ';
// new breadcrumb object
$mybreadcrumb = new breadcrumb_navigation_xt;
// Apply options
$mybreadcrumb->opt['archive_category_prefix'] = 'Category ';
$mybreadcrumb->opt['archive_date_prefix'] = 'Archive by date: ';
// Display the breadcrumb
$mybreadcrumb->display();
}
?>
</div> <!-- [breadcrumb] -->

As you can see above, to apply an option, you need to use the following syntax:

$class->opt['name_of_the_option'] = 'New Value';

Code Examples for Implementation

Example 1: Normal Blog

You have a standard wordpress blog under http://yourblog.net and want the following bread crumbs:

  • Blog’s front page: You’re browsing: Home
  • Single Post: You’re browsing: Home » Category » Blog article: Hello world!
  • Single Page: You’re browsing: Home » About
  • January 2007: You’re browsing: Home » Archive: January 2007
  • Category ‘Cats’: You’re browsing: Home » Archive by category ‘Cats’

Code:

<?php if (class_exists('breadcrumb_navigation_xt')) {
	echo 'You\'re browsing: ';
	// New breadcrumb object
	$mybreadcrumb = new breadcrumb_navigation_xt;
	// Options for breadcrumb_navigation_xt
	$mybreadcrumb->opt['title_blog'] = 'Home';
	$mybreadcrumb->opt['separator'] = ' &raquo; ';
	$mybreadcrumb->opt['singleblogpost_category_display'] = true;
	// Display the breadcrumb
	$mybreadcrumb->display();
} ?>

Example 2: Static Frontpage

Your frontpage is at http://yoursite.net and your blog is at http://yoursite.net/weblog/. The title of the frontpage is “Home” and the title of the blog is “Weblog”. You want to have the following bread crumbs:

  • Front page: You’re browsing: Home
  • Weblog: You’re browsing: Home » Weblog
  • Single blog post: You’re browsing: Home » Weblog » Category » Blog article: Hello world!
  • Single Page: You’re browsing: Home » About
  • January 2007: You’re browsing: Home » Weblog » Archive: January 2007
  • Category ‘Cats’: You’re browsing: Home » Weblog » Archive by category ‘Cats’

Code:

<?php if (class_exists('breadcrumb_navigation_xt')) {
	// Display a prefix
	echo 'You\'re browsing: ';
	// New breadcrumb object
	$mybreadcrumb = new breadcrumb_navigation_xt;
	// Apply options
	$mybreadcrumb->opt['static_frontpage'] = true;
	$mybreadcrumb->opt['url_blog'] = '/weblog/';
	$mybreadcrumb->opt['title_blog'] = 'Weblog';
	$mybreadcrumb->opt['title_home'] = 'Home';
	$mybreadcrumb->opt['separator'] = ' &raquo; ';
	$mybreadcrumb->opt['singleblogpost_category_display'] = true;
	// Display the breadcrumb
	$mybreadcrumb->display();
} ?>
  • Breadcrumb Navigation: Does not consider sub pages and 404, and other various issues.
  • Bread Crumb Trail: Sub page titles are not being displayed correctly, does not consider search or 404, and other various issues.

Donation

You like this plugin? Any donation would be highly appreciated:

Version History and Changelog

  • 1.7 [2007-02-07]:
    New feature: Now supporting Simple Tagging Plugin
  • 1.6 [2006-11-26]:
    New feature: Sub categories are being supported now, so a breadcrumb like this is possible: Home > Category > Sub-category > Sub-sub-category > Hello World
  • 1.5 [2006-08-21]:
    New feature: Categories can be displayed on single blog pages (see new options 'singleblogpost_category_display', 'singleblogpost_category_prefix', 'singleblogpost_category_suffix')
  • 1.4 [2006-05-16]:
    Bug fix: In some circumstances, a wrong post title was displayed if multiple loops were used in the theme, therefore I replaced $post->post_title with wp_title().
  • 1.3 [2006-04-27]:
    New feature: So far, this plugin was primary intended for sites that use a static front page instead of the 10 latest posts on the front page. But now there is the new option ‘static_frontpage’. If it is set to TRUE, an additional ‘Home’ link appears which points to the static front page. If set to false (default), the additional home link does no longer appear, which is more suitable when you have a classic blog (as most people have).
  • 1.2 [2006-03-15]:
    Bug fix: the option current_item_style_suffix didn’t work, current_item_style_prefix was displayed.
    New option ‘posttitle_maxlen’: Now you can limit the number of characters of the post’s title.
  • 1.1 [2006-01-29]:
    New option ‘home_link’. If set to false,only plain text is being displayed for HOME. Default is true.
    New option ‘home_display’. If set to false, HOME is not being displayed. Default is true.
  • 1.0 [2006-01-21]:
    Initial release.

Blog-Kategorien

Volltextsuche

Neueste Artikel

Neueste Kommentare

Neueste Trackbacks/Pingbacks

Andere Projekte

Blogparade

dient als zentrale Anlaufstelle für Blog-Paraden bzw. Blog-Karnevals und andere von BloggerInnen veranstaltete Aktionen.

Mediadaten

Feed-Statistik:
Feedburner

Software Guide gibt es seit Dezember 2005 und es werden durchschnittlich 5 Blog- Beiträge/Monat veröffentlicht. Die Themenschwerpunkte sind in der Tagcloud ersichtlich. Mehr Infos...

Links

 

Nach oben

Wordpress

© 2005-2014 Software Guide | ISSN 1864-9599