Related content block views

Hello everyone once again

I have done this before and worked on my other site but with this one; it's giving me an error. this is the code i used for my argument php code

$node = node_load(arg(1));
if ($node != NULL) {
$field = $node->field_art_tags;
$lang= $node->language;
$terms = $field[$lang];
foreach ($terms as $term) {
$terms[] = $term['tid'];
return implode('+', $term);
}
}

Variables from page.tpl.php to region--content.php - visibility, scope, transfer

D7 variable scope - title variable is available in page.tpl.php but in region--something.tpl.php is not.

I wan't to transfer node title to main content area which is in $render['content'] so I get to this by making region--content.php.

What is the easiest way to make $title availble in region--content.tpl.php ?

how do I make drupal not use the page.tpl in modules/system and use my theme's page.tpl instead?

how do I make drupal not use the page.tpl in modules/system/page.tpl and use my theme's page.tpl instead?

it keeps using the page.tpl.php in the modules/systems/page.tpl.php instead of the one I made in themes :|

Drupal 7 upgrade is asking for Taxonomy updates over and over again

I just upgraded from Drupal 6.20 to 7, and I couldn't be more relieved at how well it went! There seem to be only minor issues. However, there's one mysterious error occurring, and I don't want to ignore this (I want to make sure this site keeps humming along -- especially before I reinstall Views and Panels!):

After upgrading all the other modules, I am still getting a notice when I run the update script (I'm doing it as dbup in Drush, btw) that taxonomy needs to be updated. When I tell it yes, it appears to complete the updates, but then when I run the update script again, it again tells me the same taxonomy updates need to be done. (I've pasted the update messages below.)

After trying this about 4 times, I gave up, and have not been able to find any other posts on drupal.org or anywhere else about this. Does anyone know how to get these updates to go through, or what the problem is?

myaccount:/mysites/drupal-7.0/sites/mydomain.com$ drush dbup
The following updates are pending:

taxonomy module :
7004 - Move taxonomy vocabulary associations for nodes to fields and field instances.
7005 - Migrate {taxonomy_term_node} table to field storage. @todo: This function can possibly be made much faster by wrapping a transaction around all the inserts.
7006 - Add {taxonomy_term_data}.format column.

Is there a better way to access content fields with node_load() in D7?

Is there a more elegant way to refer to node fields using node_load() than to refer to each as $node->field_xyz['und'][0]['value']?

I understand the reasoning, but it's a long way to go to get to each field value. Is there a way to load the node in as an object assuming the value (or possibly the safe_value, etc) of each field?

Text field displays blank instead of 0 value

Hi... I'm trying to display a content type which has a text field with a value of 0 in it. However, Drupal seems to treat it as a null value and displays a blank value for this field. Anyone know how to display a 0 instead of showing a blank field?

Pages

Subscribe with RSS Subscribe to RSS - Drupal 7.x