Добавить блок а node.tpl.php
Thursday, April 22nd, 2010Шаг 1: в файл info темы добавляем регион
regions[left] = Left sidebar regions[right] = Right sidebar regions[content] = Content regions[header] = Header regions[footer] = Footer regions[social] = Social
Шаг 2: создаем блок и добавляем его на регион в admin/build/block
Шаг 3: Добавляем строку node.tpl.php
<?php print $social; ?>
Шаг 4: Добавляем в template.php функцию
function phptemplate_preprocess_node(&$vars) {
// Load the node region only if we're not in a teaser view.
if ( !$vars['teaser']) {
// Load region content assigned via blocks.
foreach (array('social') as $region) {
$vars[$region] = theme('blocks', $region);
}
}
return $vars;
}

