Okay, I'm breaking stuff. I'm pretty solid on CSS, but I've been a CF programmer for a long time, and I'm new to PhP, so forgive me if I'm asking stupid questions.

The Designers I'm working with have set before me an interesting challenge -- making the title of a section in the blocks areas (right and left side menus) have different styles -- the first word be one color, the rest of the title be another. So, if I were just going to code it, I would have Main Menu or something like that. The trick is to try to get the xtemplate I'm customizing to do that on the fly.

I have been trying to make the template variable {title} into two variables {title_a} and {title_b}. So I started hacking xtemplate.theme. The code I'm hacking is on my line 241 or so, and looks like this:

function xtemplate_block(&$block) {
global $xtemplate;

// create template variables for all block variables (module, delta, region, subject, content, ...)
foreach ($block as $key => $value) {
$xtemplate->template->assign($key == "subject" ? "title" : $key, $value); // TODO: standardize on 'title' (ie. rename all $block["subject"] to "title")
}
$xtemplate->template->parse("block");
$output = $xtemplate->template->text("block");
$xtemplate->template->reset("block");
return $output;
}

and to try to create my two title variables, I've created this mess:

function xtemplate_block(&$block) {
global $xtemplate;

// create template variables for all block variables (module, delta, region, subject, content, ...)
foreach ($block as $key => $value) {
$xtemplate->template->assign($key == "subject" ? "title" : $key, $value); // TODO: standardize on 'title' (ie. rename all $block["subject"] to "title")
$title_array = explode(" ",$block["title"]);
$title_a = $title_array[0];
Unset($title_array[0]);
$title_b = join (' ',$title_array);
$xtemplate->template->assign("title_a",$title_a);
$xtemplate->template->assign("title_b",$title_b);
}
$xtemplate->template->parse("block");
$output = $xtemplate->template->text("block");
$xtemplate->template->reset("block");
return $output;
}

BUT when I try to display {title_a} and {title_b} in the default theme, I don't get anything at all.

So, someone give me a smack upside the head and tell me what I'm forgetting/not seeing/not figuring out/whatver . . .

-j