I am trying to make a module for Drupal 7 that provides a block and has certain configuration settings. Now what I want is that I want to provide 5 blocks to the user so that they can use different settings in each block. In other words, I want to provide each block a separate set of settings. How can I do that?
Edit: Actually I have made a module that shows a single block. If you have used superfish menu module then you can see there that they allow us an option to choose how many block should be made available. So that for each block we can use different menu to show. I am talking about that functionality
Create a configuration page:
You create blocks in a module using hook_block_info you define an array like:
You'll configure the values in hook_block_configure:
Once you have defined your blocks you need to tell them how to display with hook_block_view. Something like:
Then you'll use the block number and configuration to determine the output: