The earlier methods would all work.  Another option is drupal_html_id($id).

"This function ensures that each passed HTML ID value only exists once on the page."

Lucas

On Tue, May 1, 2012 at 4:40 PM, Ms. Nancy Wichmann <nan_wich@bellsouth.net> wrote:
Each module may define its own IDs. Many people don't realize that the ID is actually a text field in the database, so they just use a numeric counter, as the Block module does. For the Block module, that's probably the best alternative to avoid duplication. In my modules, I prefer an alpha descriptor (or "delta") as that gives me a reminder of what the block is supposed to do. So, for an example, the Weblinks module could have "block-weblinks-random".
 
Nancy
Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.


From: Hakan

Thank you Michael, that was helpful. In other words, the block ID is
generated programmatically by the block module? It would seem to me
that the footer message would use a more "recognizable" id than
"block-block-1" - as in my case - being IDed as the first block
entered/saved...

--
[ Drupal support list | http://lists.drupal.org/ ]