Sto provando a modificare il template Garamond per drupal 5.
Vorrei aggiungere una region nell'header,ma nn capisco dove sbaglio e per quale ragione nn mi venga visualizzata:
questo è template.php
<?php
function garamond_regions() {
return array(
'right' => t('right sidebar'),
'content' => t('content'),
'footer' => t('footer'),
'custom' => t('custom')
);
}
/**
* Return a themed breadcrumb trail.
*
* @param $breadcrumb
* An array containing the breadcrumb links.
* @return a string containing the breadcrumb output.
*/
function phptemplate_breadcrumb($breadcrumb) {
if (!empty($breadcrumb)) {
return '<div class="breadcrumb">'. implode(' › ', $breadcrumb) .'</div>';
}
}
/**
* Allow themable wrapping of all comments.
*/
function phptemplate_comment_wrapper($content, $type = null) {
static $node_type;
if (isset($type)) $node_type = $type;
if (!$content || $node_type == 'forum') {
return '<div id="comments">'. $content . '</div>';
}
else {
return '<h3 id="comments">'. t('Comments') .'</h3><ol class="commentlist">'. $content .'</ol>';
}
}
e questo è il page.tpl (manca la chiamate al titolo in quanto nn mi serve dal momento che il logo è sulla mia grafica)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html" rel="nofollow">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html</a> xmlns="<a href="http://www.w3.org/1999/xhtml"" rel="nofollow">http://www.w3.org/1999/xhtml"</a> xml:lang="<?php print $language
?>
<?php
print $language
?>
<?php
print $head_title
?>
<?php
print $head
?>
<?php
print $styles
?>
<?php
print $scripts
?>
@import "
<?php
print base_path() . path_to_theme()
?>
LA CHIAMATA ALLA MIA REGIONS E' QUA
<?php
print $custom
?>
<?php
if (isset($primary_links)) :
?>
<?php
print theme('links', $primary_links, array('class' => 'nav'))
?>
<?php
endif;
?>
<?php
if ($breadcrumb): print $breadcrumb; endif;
?>
<?php
if ($mission): print '<div id="mission">'. $mission .'</div>'; endif;
?>
<?php
if ($tabs): print '<div id="tabs-wrapper" class="clear-block">'. $tabs .'</div>'; endif;
?>
<?php
if (isset($tabs2)): print $tabs2; endif;
?>
<?php
if ($help): print $help; endif;
?>
<?php
if ($messages): print $messages; endif;
?>
<?php
if ($title): print '<h2'. ($tabs ? ' class="with-tabs"' : '') .'>'. $title .'</h2>'; endif;
?>
<?php
print $content
?>
-
<?php
if ($search_box):
?><?php
print $search_box
?><?php
endif;
?>
<?php
if ($sidebar_right):
?>
<?php
print $sidebar_right
?>
<?php
endif;
?>
<?php
print $footer_message
?>
<?php
print $feed_icons
?>
Powered by Drupal - Design by artinet
<?php
print $closure
?>
Sto per sclerare.. :'( .. ho copiato anche esempi dal sito ufficiale ma niente da fare... la mia procedura sembra quella giusta ....
Ok mi do dell'idiota da solo ^_^..
ho perso un pomeriggio per una stupidata..
Dimenticavo di rinominare la function region del template.php con lo stesso nome della cartella in cui è contenuto il tema..