Posted by suryakanta101 on June 3, 2012 at 4:01am
Dear all,
I have a dynamic array from Table
named $list=array(
0=>array(
name=IGGGhh,
address= DFfefnksdsd
)
1=>array(
name=IGGGhh,
address= DFfefnksdsd
)
)
I want to Make it a List page inside a Block. What should be my Hook approch?
Comments
Is it a table that views
Is it a table that views "knows" about, if so that would be one way to make the block.
What do you want the list to look like and how do you load the array?
Is it a table that views Reply
It is a custom module i am designing , and i am new to drupal.
I have fetched some rows from table and i want to show those in a block of my page in a "custom" module.
what is the procedure i want to know.
Thank you
If you are new to Drupal I
If you are new to Drupal I strongly recommend you first learn what Drupal has to offer. For example, you can probably use a content type and views to achieve that.
You can build your custom
You can build your custom module block using the drupal hooks.
hook_block_info(), replace the hook from function by your module name.
Define all blocks provided by the module. refer below listed link for more details.
http://api.drupal.org/api/drupal/modules%21block%21block.api.php/function/hook_block_info/7
Next you have to implement the "hook_block_view($delta = '')" which display the block in particular region. This hook called when the block is display on any page to build the content.
For more details about 'hook_block_view' follow below link.[replace 'hook' by your module name]
http://api.drupal.org/api/drupal/modules%21block%21block.api.php/function/hook_block_view/7
Tushar Bodake