shopp('storefront.breadcrumb')

Displays the navigation breadcrumb link or set of links for the current storefront page.

shopp('storefront', 'breadcrumb', 'options')

@param string $object the object or object.tag combination, if object.tag is used, the tag parameter can be omitted
@param string $tag the tag, can be hyphenated or not. Prefix with 'get' as shorthand for the return=true option
@param mixed $options associative array, or url-style name=value pairs separated by ampersands (&). Each pair is passed to the theme api tag as an option.
@returns void by default, and string breadcrumb link set if return option is used.

Displays the navigation breadcrumb link or set of links for the current storefront page.

This link can be used on the following types of pages:

  • Account Dashboard – When used on the storefront account page, this tag displays the main account page link, followed by the currently requested account subpage link.
  • Cart – When used on the cart page, this tag displays the cart page link.
  • Checkout – When used on the checkout page, this tag displays the cart page link, followed by the checkout page link.
  • Confirm Order – When used on the confirm order page, this tag displays the cart page link, followed by the checkout page link, followed by the confirm order page link.
  • Thanks/Receipt – When used on the thanks/receipt page, this tag displays the thanks page link.
  • Product Collection – When used on a product collection page, this tag displays the link to that collection.
  • Product Taxonomy – When used on a product term page, this tag displays the ancestry leading up to the current term. (ie. grandparent term, parent term, term ) If the taxonomy is not hierarchical, this tag will display only the link to the term.
  • Product – When used on a product page (page request,not when loaded by short-code or loaded in the api), this tag displays the first category found to which the product belongs.

Note that the behavior for product pages has changed when the product belongs to multiple categories. The breadcrumb no long displays the category from which the product was requested by the user. In this way, the product page will always have a breadcrumb including a category link, even if the product was requested directly. In order to choose the category displayed in the breadcrumb, assign the product to only the category to which you would prefer displayed in the breadcrumb. It is recommended that you associate the product with the leaf descendent of hierarchical categories (one that is the parent of no other category).

Options

  • limit: (retired) no longer used.
  • separator: text separating each two breadcrumb links. Defaults to ‘ » ‘ (ex link 1 » link 2).
  • wrap: the starting html tag surrounding the set of breadcrumb links. Defaults to <ul class=”breadcrumb”>.
  • endwrap: the ending html tag surrounding the entire breadcrumb. Defaults to </ul>.
  • before: the starting html tag surrounding each breadcrumb link. Defaults to <li>.
  • after: the ending html tag surrounding each breadcrumb link. Defaults to </li>.

Universal Options

All Theme API calls have these options.

  • return: when set to true, 1, or on, this option forces the tag to return the value instead of displaying/echoing the value to the page. Alternatively, prefix the tag parameter with get to get the same effect. All theme api tags that return a boolean value will return by default.
  • echo: when set to false, 0, or off, this option forces the tag to display the value to the page. This is the default for all non-boolean tags.
  • is: when set to true, 1, or on, this option will evaluate the return of the theme api call as a boolean true or false value. See how values are converted to boolean.

Alternative Forms

shopp('storefront.breadcrumb', 'options...');
shopp('catalog', 'breadcrumb', 'options...');

Examples

Defaults

shopp('storefront', 'breadcrumb');

Change the Separator

shopp('storefront', 'breadcrumb', 'separator=&nbsp;&rarr;&nbsp;');

Customized Breadcrumbs

shopp('storefront', 'breadcrumb',
    // options
    array(
        'separator' => '&nbsp;&rarr;&nbsp;',
        'wrap' => '<div id="breadcrumbs">',
        'endwrap' => '</div>',
        'before' => '<span class="breadcrumb">',
        'after' => '</span>',       
    )
);

See Also

You must be logged in to post a comment.

© Ingenesis Limited. Shopp™ is a registered trademark of Ingenesis Limited.

Skip to toolbar