we add blocks to cms/blocks and pages using this convention
{{block type="cms/block" block_id="my_block1"}}
{{widget type="cms/widget_block" template="cms/widget/static_block/default.phtml" block_id="my_block2"}}
Now recently I had to specificall set the CSS styling to my_block1 (or my_block2 for that matter) when I saw that these blocks all have the same CSS CLASS widget widget-static-block
. I was hoping to see something widget widget-static-block my_block1
My question: Now how can we add the block ID to the class? And would this not be a good idea to add to Magento core?
And as a side question: what exactly is the difference between the two cms/block calls? (1 widget and 1 block both under cms)
So the result would be something like widget widget-static-block my_block1
or cms_block my_block1
ps. I do understand there may be some caveats - because you might not want to always expose the exact block ID in your HTML. But I can imagine that for instance the name="" or as="" statement could in that case function as the name and it can be passed via the cms/block call and added as a CLASS element.