Is there any way to assign custom css classes to specific tables instead of "maintable"? Specifically I want to assign a class to the breadcrumb table. I'm aware I can edit theme.php and wrap the breadcrub in a custom table but that in turn will still be wrapped by the maintable which won't work for what I'm trying to accomplish.
Nevermind :) If anyone is interested this is how I did it. Be aware that this works with the standard theme/template files I modified and I'm not sure if has any conflicts with unmodified standard template/theme files.
Open theme.php and find:
EOT;
// HTML template for the breadcrumb
$template_breadcrumb = <<<EOT
<!-- BEGIN breadcrumb -->
Replace with:
EOT;
// HTML template for the breadcrumb
$template_breadcrumb = <<<EOT
<!-- BEGIN breadcrumb -->
<table class="yourcustomclass">
---------------------------------------------------------
Find:
function theme_display_breadcrumb($breadcrumb, &$cat_data)
{
/**
* ** added breadcrumb as a seperate element
*/
global $template_breadcrumb, $lang_breadcrumb;
starttable('100%');
if ($breadcrumb) {
$template = template_extract_block($template_breadcrumb, 'breadcrumb');
$params = array('{BREADCRUMB}' => $breadcrumb
);
echo template_eval($template, $params);
}
endtable();
}
Replace with:
function theme_display_breadcrumb($breadcrumb, &$cat_data)
{
/**
* ** added breadcrumb as a seperate element
*/
global $template_breadcrumb, $lang_breadcrumb;
if ($breadcrumb) {
$template = template_extract_block($template_breadcrumb, 'breadcrumb');
$params = array('{BREADCRUMB}' => $breadcrumb
);
echo template_eval($template, $params);
}
endtable();
}
Pretty simple actually. I tried just wrapping the html template in a table and remove endtable(); but the for whatever reason the closing table tag doesn't appear. The above code seems to work fine. I haven't tried it but it appaers you could do this with any table template. I'm sure this posted before or something similar but I couldn't find it.