From: Chad K. <ch...@2t...> - 2011-01-04 23:02:43
|
On Dec 27, 2010, at 10:08 PM, Bharat Mediratta wrote: > On 12/27/2010 7:07 PM, Chad Kieffer wrote: >> Hello, >> >> I'd like a module I'm working on to be able to inject an additional >> item into another module's block, specifically the info module's >> block. I'm not quite sure how to accomplish this. It doesn't appear >> that I can override the info module's block view template to add my >> module's info, and even if I could, it isn't an ideal solution. >> >> I'm considering a refactor of the info module's block template to >> have it accept additional block parameters. Does this seem >> reasonable? > > The right approach here is to have the info module publish an event with > its block as the data and let any other module modify the block as it > wishes. For example, checkout out album::get_add_form publishes the > album_add_form event which lets other modules modify the form. > > -Bharat Thanks for the help with this Bharat. Here's the new info_block_metadata event: http://bit.ly/fcXw8z and the bit.ly module using it to add shortened links to the info block: http://bit.ly/he9U4M Comments? |