Search code examples
drupaldrupal-7block

$content variable in drupal 7.(block.tpl.php)


I have a template for ablock in my drupal 7.

The file block.tpl.php is like this:

<?php print render($title_prefix); ?>
<?php if ($block->subject): ?>

<h3<?php print $title_attributes; ?>><?php print $block->subject ?></h3>

<?php endif;?>
<?php print render($title_suffix); ?>
  
<li class="leftMenu_goPortal_options" style="display: list-item;">
<ul class="gn-submenu">

print $content_attributes; ?>
<?php print $content ?>

</ul>
</li>

I want to change the $content variable, because my content area in on the site all is like ul or li.

I need to have 2 variables, one for block content and one for site content.

TNX!


Solution

  • The $content inside block.tpl.php will have only the content of the block. If you want to see the html of the page you are currently in, you have the page.tpl.php, where regions and blocks inside those are printed.