You are here

README.txt in Block Machine Name 7

Block Machine Name is a small module that adds a machine name field to custom blocks.

Its primary intent is to solve the problem of styling and rendering blocks that use 
numeric auto-increment ID's which may later not match their production values when 
the blocks are reproduced.

Machine names can only contain lowercase letters, numbers, and underscores.

Classes:
If you give your custom block a machine name such as 'my_cool_block', the block will 
be given a class of 'block-my-cool-block' (underscores will be converted to dashes).

Template Suggestions:
The module will also provide a template suggestion - in the above example, you could 
create a tpl named 'block--my-cool-block.tpl.php' (tpl files always use dashes).

File

README.txt
View source
  1. Block Machine Name is a small module that adds a machine name field to custom blocks.
  2. Its primary intent is to solve the problem of styling and rendering blocks that use
  3. numeric auto-increment ID's which may later not match their production values when
  4. the blocks are reproduced.
  5. Machine names can only contain lowercase letters, numbers, and underscores.
  6. Classes:
  7. If you give your custom block a machine name such as 'my_cool_block', the block will
  8. be given a class of 'block-my-cool-block' (underscores will be converted to dashes).
  9. Template Suggestions:
  10. The module will also provide a template suggestion - in the above example, you could
  11. create a tpl named 'block--my-cool-block.tpl.php' (tpl files always use dashes).