By jorje29 on
When I make some changes inside hook_block in my .module file, I can't see the changes.
Is there a special way to tell drupal to reload(refresh) block information by reading again hook_block ?
Thanx
When I make some changes inside hook_block in my .module file, I can't see the changes.
Is there a special way to tell drupal to reload(refresh) block information by reading again hook_block ?
Thanx
Comments
By default the information is
By default the information is not cached, so it depends on what you changed. If you changed what is displayed simply visiting a page with the block should show the change. Otherwise visit the block admin page.
nevets, I understand what you
nevets,
I understand what you say, some things change with a simple reload of the page, But what if you have the code below ? I don't see any effect when I change any of the block attributes.
That is probably true since
That is probably true since Drupal saves the settings for a block once it is saved/configured from the block administration page. You would need to delete the block from the blocks table.
I agree, this is the way it's
I agree, this is the way it's working. Does this mean that reads the code of hook_block once ?
Btw, how can I add the delete option next to my blocks, in blocks list, ( created by my module ) ? there is only "configure" option, right now.
Thanx nevets for replying
Re: "Does this mean that
Re: "Does this mean that reads the code of hook_block once", no, but for the case of $op equals 'info', hook_block() returns the initial configuration values, after that they come from the saved values (remember users can change the configuration).
As for 'delete' that only applies to custom blocks added with 'add block'.
Thanx nevets, Can you be a
Thanx nevets,
Can you be a bit more specific on " As for 'delete' that only applies to custom blocks added with 'add block'. " ?
What do you mean exactly ?
Only blocks added through the
Only blocks added through the block administration page have the delete option.
This means that whenever I
This means that whenever I make changes to my hook_block code above, I have to make them twice, also inside block administration page. Right ?
For the case where $op equals
For the case where $op equals 'info', any changes would need to be made in both places.