You are here

function asset_wizard_get_path in Asset 6

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

File

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

Code

function asset_wizard_get_path() {
  $asset = is_numeric(arg(2)) ? asset_load(arg(2), TRUE) : NULL;
  $breadcrumb = array();

  //  if(in_array(arg(3), array_keys($asset->formatters))){
  //    $breadcrumb[] = tbl(_asset_wizard_truncate($asset->formatters[arg(3)]['name'], 30), 'asset/wizard/'. $asset->aid .'/'. arg(3));
  //  }
  if ($asset->aid) {
    $breadcrumb[] = tbl(_asset_wizard_truncate($asset->title, 30), 'asset/wizard/' . $asset->aid);
  }
  while ($pid = $asset->pid) {
    $asset = asset_load($pid);
    $breadcrumb[] = tbl(_asset_wizard_truncate($asset->title, 20), 'asset/wizard/' . $asset->aid);
  }
  $breadcrumb[] = tbl(t('Assets'), 'asset/wizard/browse');
  return join(' / ', array_reverse($breadcrumb));
}