Jump to content

sijumonap

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

sijumonap's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I have got the answer. The values for $block->module and $block->delta is available in the "configure" link (Admin - Site Building - Blocks) of each blocks.
  2. I will explain the doubt with my block.tpl.php. <?php <div class="block block-<?php print $block->module; ?>" id="block-<?php print $block->module; ?>-<?php print $block->delta; ?>"> <h2 class="title"><?php print $block->subject; ?></h2> <div class="content"><?php print $block->content; ?></div> //the following area I have used with reference of the Drupal manual $module = 'some_module'; //how can we assign a constant value for this when there are five or six blocks/regions in the page $delta = 0; //how can we assign a constant value for this when there are five or six blocks/regions in the page if ( $block->module == $module && $block->delta == $delta ) { print l('(edit this block)', "/admin/build/block/configure/$block->module/$block->delta"); } ?> Note: I have commented my doubts with two lines of the above code. In my case, there are five blocks in the page and I want to insert the "Edit this Block" link only for a block. When I tried to use the code without an IF condition, it comes for all blocks. So, I have inserted that part of your code in it. For that, I want to check with the variable '$block->delta' like this: if ($block->delta == '----something----' ) But, I don't know it's value. So, please give me the guidelines to get the variable.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.