Block Visibility

Discussion in 'Drupal' started by wamm9512, Jan 28, 2010.

  1. #1
    Can anybody help me figure out how to show a block on a specific page? I only want to show the block on the front page or the index. I don't want it shown when clicking on the buttons at the bottom to see other posts. I need it to be displayed only on the front page. Can anybody help?
     
    wamm9512, Jan 28, 2010 IP
  2. wamm9512

    wamm9512 Active Member

    Messages:
    321
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    58
    #2
    <?php
    $match = FALSE;
    $url = request_uri();

    if (drupal_is_front_page()) {
    $match = TRUE;
    }
    if (strpos($url, "node")) {
    $match = FALSE;
    }
    return $match;
    ?>

    In case anybody is interested
     
    wamm9512, Jan 28, 2010 IP