This forum is for assistance with theme development.

Set secondary_menu in node-[content_type].tpl.php

I have a site with multiple sets of secondary menus. So node/23 would need to display a certain set of menus, and node/33 would need to display a different set of menus.

My secondary_menu is in the place I would like these menus to appear, and so would like to be able to set the secondary_menu var to this preset menu structure according to which node is displayed. I thought the best way to go about this might be to set the secondary_menu var to this with variable_set('secondary_links', menu_tree($pid)) but since the node-[content_type].tpl.php is processed after the page.tpl.php (I think) I'm unable to set it there. variable_set() may not be the correct route to go either, but I'm unsure of what else to do.

You might be thinking at this point, "Why doesn't he just set his secondary menu to his primary links so that the primary_links children display in the normal drupal manner?", but my site structure is much more complex then that. The secondary menu I would like to display is not part of the same menu as the primary menu, and the main links that would open up these nodes are already children of the primary_links. So it's almost like I would like to set up a tertiary menu in essence, which cannot be associated with the primary or secondary menu directly.

help with amadeu teme, i want to change some icons

Hello, i´d like to change some of the amadeu icons, the menu collapsable, menu expanded and menu leaf.

i take the new png and rewrite the all one to another name, and left the new one with the name. But i still see the all one icons.

i take out the cache and cookies from firefoex, but i get nothing.

can anyone help me?

thanks

oskar

Custom Themes

I'm creating my first drupal site and I'm having trouble with my template. I have modified an exisitng template where there is a header sidebar-left, content, the new column called the sweet-spot, sidebar right, and the footer. The sweetspot is not apearring. it shows up as a "0" in the

it occupies. Is there a simple soulution to adding coulmns into the template or am I stuck with the side left side right and content columns? Any help is appreciated.

help with webforms module, theme_table and theme_pager

Hiya. Can anyone help me figure out how to use theme_pager with theme_table? I am a novice with PHP, but I have a petition site (http:copycrime.org - and EFF project) that's using webform module and this code to print results with theme_table, and I need to add paging to the results. I'm not sure how best to proceed.


<?php
include_once(drupal_get_path('module', 'webform')."/webform.inc");
$nid=2;

function _webform_results_table($nid) {

// Load Components
_webform_load_components();

$header = array();
$rows = array();
$cell = array();

// Get all the component cid and names for the node
$query = 'SELECT cid, name, type, extra FROM {webform_component} WHERE nid = %d and cid in (1175823068, 1175997870) ORDER BY weight, name';

$res = db_query($query, $nid);
while($component = db_fetch_array($res)) {
$components[] = $component;
}

// Get all the submissions for the node
$submissions = _webform_fetch_submissions($nid);
// Generate a row for each submission
foreach ($submissions as $sid => $submission) {
$componentHeaders = array();

// Generate a cell for each component
foreach($components as $component) {
$component['extra'] = unserialize($component['extra']);
$tableFunction = "_webform_table_data_".$component['type'];
if (function_exists($tableFunction)) {

CSS book for styling Drupal: recommendation wanted

My wife is about to style her first Drupal site and wants to buy a book on CSS. She comes from a typsetting world so is very familiar with the concepts but does not know any CSS. Does anyone have any recommendations? She particularly needs one that deals with multiple browser issues.

accessing the 'name' data from the 'node_type' db table

I'm trying to display the node type within the actual node content. If I use $node->type, I end up with the single-word, cryptic 'type' for the node. This info (I assume) comes from the 'type' column in the 'node_type' table.

So I'd like to access the 'name' column data from this same table, but nothing I've tried has worked. I've used:

$node_type->name
$node->type[name]
$node->type['name']

However, I have acheived the proper result by adding a lengthy IF statement, as in:

Pages

Subscribe with RSS Subscribe to RSS - Theme development