This forum is for assistance with theme development.

Apply Specific HTML template to: taxonomy OR node-type OR module OR block

Hi,

i'm new in Drupal (ex postnuke user) and i would like to know if it's possible to
apply different html templates for differents taxonomy or different module or different block.

If we can do it, where can I find documentation about it?

I look on the forum put I found a lot of un-awnsered answers

Xtemplate Block Template Fiddling

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:

Xtemplate Block Template Fiddling

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:

Any site provide drupal template?

Is that any site that provide drupal templates? I've been looking around but it's hard for me to find it. Currently I used phptemplate for my site.

I hope there will be more template added in Drupal :)

what is ""?

A quick question.

Just going through the Theme tutorial (great btw!), and I noticed this code block in the xtemplate.xtmpl file that wasn't documented,

.

Just wondering what this does? Thanks!

custom colors for the same theme

I want to edit my current theme, change the colors so there are multiple color schemes of the same theme for users to choose from.

In the theme file for phptemplate it says

"Custom templates can be written by simply copying the default directory to something
else and making your modifications"

Is there something missing because I've tried this and when I go into admin/themes it brings up this error.

Pages

Subscribe with RSS Subscribe to RSS - Theme development