front page regions does not appear in administer>>site building>>blocks

Events happening in the community are now at Drupal community events on www.drupal.org.
jundolor's picture

on template.php, i defined the region frontNews via the code below. I had intended the region to appear only on the front page.

function mysite_regions() {

return array(

   'left' => t('left sidebar'),

   'right' => t('right sidebar'),

   'content_top' => t('content top'),

   'content_bottom' => t('content bottom'),

   'header' => t('header'),

  'user01' => t('user01'),

  'frontNews' => t('frontNews')

);

}

On page.tpl.php, I entered the folowing code inside the body rags:

<?php
if ($is_front || strstr($_GET['q'], 'admin/block')) :
?>
this should appear on home page only
<?php
print $frontNews;
?>
second row, column 1- test only second row, column 2- test only
    
<?php
endif;
?>

If I click on the logo, I get the home page and see the text entered in the table tags. If I go to a node content, the table text does not appear. So far, I got the results I wanted.

The only thing I need to do is to place a block on the region frontNews; but lo and behold, the administer>>site building>>blocks does not display the region in the list. Is it because the administer is not the home page? How am I now to enter a block on the front page region if such is the case?

Many thanks, Jun D!

Comments

Problem fixed!!!

jundolor's picture

Hello all!!!

The region appears on the list!!!

Silly me! Its just that I'm having a Drupal marathon to meet a deadline and I'm so tensed up to the point of missing out some basic items!!!

Moral of the experience: relax ka lang when using Drupal :-)

Just the same, many thanks to the group for helping me out...

P.S. I'm looking forward to the second Drupal meet.

Panels + Views

marcrobinsone's picture

I thinks Panels and Views modules will do the job for you.

Lots of luck on your site!

Philippines

Group organizers

Group categories

Post category

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: