This forum is for assistance with theme development.

Where is everything?

I have spent the better part of two weeks trying to find docs on variables and core code to Drupal. I have yet to find even a simple list. When you look at a theme are variable being used but there is nothing in the docs that describe anything more that the fact that the say "hooks". Well okay but what are there names and where tdo they come from?

What's the secret recipe?

How to create a block with just the search box?

Hi everyone,

I think the title says it all. I can't figure out how to create a content block which should only display the search box (which likes to live on the upper right side on mose themes). I can see how to remove the search box from there, I also realize that I should probably create a PHP block, but I can't (yet) figure out just what code to pop in there. I'd appreciate any clues; I'm sure somebody must've done it by now in some theme.

Replacing the default menu-structure

Hi,

First of all - I realize that this seems like I've not looked around at all before asking this question. Thats not true. I also realize that it's a easy question but I can't figure out how to do it.

The question: How do you alter the presentation of the menu in a theme? I want to get rid of the "< div class="menu">" line.

Thanks,

Fredrik

Hack to prevent display of Title in Block

I've been messing around with applying different CSS styles to blocks and found out quickly that you can't really style the titles of a block much because the titles don't hold much text. When designing a block, I have to split it into two parts, a poorly styled title, and a content area that can be very highly customized. I'm also stuck with a fixed gap between the two.

It seemed to me that if I could have the ability to optionally NOT display the title, then I could have more control over the look of my block using CSS. I tried not entering a title, but that was forbidden. I decided that I should create a code and place it at the front of my title. If the theme engine spotted the code, it would not emit the title. I decided that the code had to be reasonably unique, and settled on !!invisible!!

I managed to achieve my goal by replacing the line (in xtemplate.engine):
$xtemplate->template->assign($key == "subject" ? "title" : $key, $value); // TODO: standardize on 'title' (ie. rename all $block["subject"] to "title")

with:

$xtemplate->template->assign($key == "subject" ? "title" : $key, (substr($value, 0, 13) == "!!invisible!!" ? "" : $value)); // TODO: standardize on 'title' (ie. rename all $block["subject"] to "title")

Once that's done, any titles that start with !!invisible!! will not be displayed. That let me make blocks which were one text line in height, and others which had elaborately styled titling. Maybe someone else might be interested in this hack.

Custom theme that uses javascript menus to display blocks

I wanted to create my own blog but couldn't really get the usual themes (Marvin, xtemplate) to look how I wanted them to. So I wrote a new theme that creates javascript menus out of the blocks. This theme is being used at www.joepilot.net. It includes the .theme file, menu.js (powers the menus), layout.css (sets the layout), and style.css (sets colors, borders, etc). This also includes any images I use on my site, obviously, you can change them however you wish.

XTemplate and a JavaScript menu

Hi,

I am trying to replace the normal links in this theme wit a JavaScript based menu. No luck yet. Anyone who can help me out? Where do I have to put this lines:

script language="Javascript" type="text/javascript" src="javascript/menuitems.js">

script language="Javascript" type="text/javascript" src="javascript/menuprogr.js">

I removed the first < because otherwise this website won't accept it. Even with the it did not work. So both lines has indeed a < in front.

Pages

Subscribe with RSS Subscribe to RSS - Theme development