0

I have written a custom module which creates a block. I invoke the block from a template file using the following code.

$block = module_invoke('my_mod', 'block_view', 'block_1a', $an_argument);
print $block['content'];  

I need to access $an_argument in the module when the block is created.

How can I access the argument I pass to the block when it's invoked?

apaderno
  • 28,547
  • 16
  • 75
  • 90
rix
  • 10,104
  • 14
  • 65
  • 92

1 Answers1

1

I believe you would have to implement the hook_block_view to handle your argument.

The api docs for hook_block_view

joakaune
  • 141
  • 1
  • 6