This forum is for assistance with theme development.

Variable name for content block in PHP Template?

I'm working with the minnelli, the fixed width version of garland included with 5.0 beta. I've configured a block to show up in the content region using "content" in the region choice through block adminstration. By default, it appears at the bottom after the node; I need to move it to the top of the node below the title and tabs. I've looked through the various tpl.php files. I don't see any print statements for that particular block so that I can modify the page.tpl.php file.

how to get consistant look of a book

Hi ,

I have written a theme (node-book.tpl.php) which gives a look and feel of a book to the node.
My question is since all type of content types (defined using CCK) can be added to the book (using outline), can I maintain the consistant look and feel.

i.e if I am browsing a book and using book navigation, the content type shouls look like a book and when I see the same content from say recent posts, It should appear in its own theme.

Is it possible to do ? may be using tracking or referer?

getting list of primary links as array

Hi,

In my home-brewn theme using PHPTemplate, I'd like to replace the default
"LinkA | Link B | ... | " output (from theme('links',...)) with a selector (pulldown menu). There may be some neat javascript tricks to do this, but my knowledge just extends to a
...

type pulldown.

For this to work, I'm looking for the correct entry point in the drupal 4.7 API to get a list of my primary links (Descriptions + hrefs). Is there such functionality?

Thanks!

--nico

Garland - why you're using "max-width" for #wrapper #container?

I'm rebuilding my own theme and having a look into Garland.

Well, I didn't found the reason, why you're using the max-width in style.css

#wrapper #container {
  margin: 0 auto;
  padding: 0 20px;
  max-width: 1270px;
}

passing parameters to the menu_tree function

Hello

Is there a way of passing more parameters to the theme_menu_tree function apart from the $pid.

Basically I want to add an id to each ul element in the format of

id="menu-".

I have managed to create and id in the format

id="menu-".$pid

I can live with menu-$pid but is would like to know.

I know the name of the menu is pass to the block functions not the menu functions.

Any ideas?

Frank

Different Header Images for Different Nodes

Drupal provides same header for the whole site and if we want to theme all the nodes individually then it’s a bit complicated process. While looking for alternatives to this, the following snippet work fine, this has been implemented in www.vinrcorp.com you can see the example before using it. The usage of the snippet is also quit simple just put this code into the header part or where ever you want, of page.tpl.php file of your theme.

<table>
  <tr>
    <td><img src="[path to image folder]/images/<?php
	if ($node->nid == 1) {
	print 'image-1.jpg" />';
	}elseif ($node->nid == 2){
	print 'image-2.jpg" />';
	}elseif ($node->nid == 3){
	print 'image-3.jpg" />';
	}elseif ($node->nid == 4){
	print 'image-4.jpg" />';
	}elseif ($node->nid == 5){
	print 'image-5.jpg" />';
	}elseif ($node->nid == 6){
	print 'image-6.jpg" />';
	}elseif ($node->nid == 7){
	print 'image-7.jpg" />';
	}elseif ($node->nid == 8) {
	print 'image-8.jpg" />';
	}elseif (($node->nid == 9) | ($node->nid == 10)){
	print 'image-9.jpg" />';
	}elseif ($node->nid == 11) {
	print 'image-11.jpg" />';
	}else {
	print 'default-image.jpg" />';
	}?>
 	</td>
  </tr>
</table>

To use it just put images in the image folder and mention the path in the code and also replace the names of images as per the node ids. This will help you to display different banner images for different nodes.

Pages

Subscribe with RSS Subscribe to RSS - Theme development