This forum is for assistance with theme development.

phptemplate: How do you add variables to the page template?

I want to use the $terms variable (taxonomy terms) in the pagetemplate of phptemplate. This show in the node template in the box_grey theme so I thought just using it would be okay. Well that did not work. so I tried to add the code used in the engine to set the node variables to the page template. this did not work either.

How do you best accomplish adding variables to a template?

TIA

Alternating classes

I'm making a theme with the PHPTemplates engine. I'd like to be able to alternate between two different classes every time a an item appears on a page. For example, with the teasers that appear on the front page:

<div class="node class1">blah blah blah</div>
<div class="node class2">blah blah blah</div>
<div class="node class1">blah blah blah</div>

Is there an easy way to make the class switch for every instance of an item like that?

Default Themes failed can they be fixed? How do you remove them?

I went to my site and Bamm! The whole CSS layout was trashed and the HTML body and other elements would not render in the browser. So thinking that it was a MySQL problem I ran emptied the cache. Nothing. Ran the backup. Nothing. I changed themes to bluemarine. Better but many lines were stilll missing. I installed the default chamelon theme since I was using a modified one. Nothing same thing. Since my internet connection died earlier I decided to set up on localhost and try some new stuff. I installed the interlaced theme on a whim. Whoa! the whole thing worked as it should.

Display site slogan in chameleon

I couldn't get the site slogan to display using the chameleon theme. I added the following to the chameleon.css template and it seems to work.

#header .slogan {
font-size: 1.2em;
font-weight: bold;
}

I'm not at all an experienced programer and I'm sure others will have better fixes but I thought this might help someone who is having the same problem.

converting 4.4 theme to 4.5 problem

Hello folks,

I'm a bit stumped here.

I just copied my 4.4 xtemplate theme to my new 4.5 installation.
My theme is listed ok but when I enable and set it as default I just receive a page stripped off everything except basic styling and content.

Can anybody give me a clue? I looked here and there but could not find an explanation to this behaviour.
The logs show nothing going on out of the ordinary.

Philippe.

Tutorial or more documentation?

Hi,

I was wondering if there are any tutorials on making themes for drupal?

I have read the documentation and it does not help one bit.
I pulled apart the xtemplate themes but it just went nasty.

So any more information would be great...
Or a good theme to rip apart and make themes from would also be great.

Thanks

Pages

Subscribe with RSS Subscribe to RSS - Theme development