You are here

function asset_wizard_set_breadcrumb in Asset 6

Same name and namespace in other branches
  1. 5.2 asset_wizard.module \asset_wizard_set_breadcrumb()

Set breadcrumb based on asset heirarchy

1 call to asset_wizard_set_breadcrumb()
theme_asset_wizard_page in ./asset_wizard.module

File

./asset_wizard.module, line 539
Wizard-style interface for Asset.

Code

function asset_wizard_set_breadcrumb() {
  $breadcrumb[] = tbl(t('Step 1: Start'), 'asset/wizard');
  if (arg(2) && !is_numeric(arg(2))) {
    $breadcrumb[] = tbl(t('Step 2: Selection'), 'asset/wizard/browse');
  }
  elseif (is_numeric(arg(2))) {
    $asset = asset_load(arg(2));
    if ($asset->type == 'directory') {
      $breadcrumb[] = tbl(t('Step 2: Selection'), 'asset/wizard/' . $asset->aid);
    }
    else {
      $breadcrumb[] = tbl(t('Step 2: Selection'), 'asset/wizard/' . $asset->pid);
      $breadcrumb[] = tbl(t('Step 3: Formatting'), 'asset/wizard/' . $asset->aid);
    }
  }
  drupal_set_breadcrumb($breadcrumb);
}