This entire article is great, but here: http://dwarffortresswiki.org/index.php/DF2014:Trap_design#Magma_and_fire_traps
"Consider a hallway filled with lignite floor grates, which can be built directly on the floor and do not impede the passage of enemies. Pouring magma on any one of these grates will set it alight, and the fire will spread to all connected grates. The end result is a lot of constant smoke and a hallway that kills anything that passes through it. Consider restricting access to your dwarves or building this in a pit with a retractable bridge over top: the mere fact that a location is on fire will not stop them from walking through it. On the plus side, goblins are just as stupid."
deleted by creator
This entire article is great, but here: http://dwarffortresswiki.org/index.php/DF2014:Trap_design#Magma_and_fire_traps
"Consider a hallway filled with lignite floor grates, which can be built directly on the floor and do not impede the passage of enemies. Pouring magma on any one of these grates will set it alight, and the fire will spread to all connected grates. The end result is a lot of constant smoke and a hallway that kills anything that passes through it. Consider restricting access to your dwarves or building this in a pit with a retractable bridge over top: the mere fact that a location is on fire will not stop them from walking through it. On the plus side, goblins are just as stupid."