[drupal-devel] Theme function for outputting block links

Tim Altman web at timaltman.com
Wed Jan 19 12:36:12 UTC 2005

On Wed, 19 Jan 2005 11:42:08 +0100, Stefan Nagtegaal  
<drupal-devel at frontaal-online.com> wrote:

> Tim Altman schreef:
>> On Tue, 18 Jan 2005 21:47:58 +0100, Steven Wittens <steven at acko.net>  
>> wrote:
>>>>     Is there a function to theme links specifically for blocks?
>>> There is none, but depending on you want, the simple CSS selector   
>>> ".block a" (and variations on it) might be all you need.
>>     What I'm thinking is probably more along the lines of a new hook,  
>> rather  than theming.  So, we'd have hook_block_links (or extend  
>> hook_links to  have a binary block parameter), which would allow all  
>> modules to add links  to specific blocks.  Then, those links would be  
>> passed to theme_links,  which would do its work.
>>     I think this is more than a CSS issue, as most links should be  
>> wrapped in  some block level element.  Weblink.module is currently  
>> inserting its own  HTML to do this.
>>     Thoughts?
> -1 on this..
> We output a unique id for each block, which helps us to theme the  
> various blocks in a unique way..

	Fair enough, but there's no clean way for a module to output links  
specifically for a block.  And, AFAICT, any links that are output now are  
stuck in module-specific markup.  Isn't consistency a good thing?

Tim Altman

More information about the drupal-devel mailing list