I've spent a bit of time looking over the queue, and I'm sure this exists, but I can't find it. So please if you know of the outstanding issue for this, direct me to it.
Block module naming conventions are annoying, and uninformative. I don't know which block block-block-22.tpl.php actually is, and as such it is difficult to maintain. I seem to recall giving blocks machine readable names at one point (5.x?) and would like to go back to doing that similar to the way views and cck handle this. Once a field in cck is created you can't change its machine-readable name, thus any custom code built for it is always maintained. If we could do this for block module's admin generated blocks, it would be much more useful to the themer maintaining the site. So using my above example.
Instead of:
block-block-22.tpl.php
we'd have:
block-block-machine_name.tpl.php
hope this seems logical to others.
Eclipse
Comments
Comment #1
effulgentsia CreditAttribution: effulgentsia commentedI agree that machine names for administrator-added blocks would be nice.
Comment #2
klonosRelated:
#863554: Add ability to set a block's CSS ID (Block class module)
Suggestion for the Block 2.0 module
Comment #3
larowlanTagging to align with D8 core track.
Crossposting for reference: #430886: Make all blocks fieldable entities
Comment #4
sunWe don't want machine names for every single block instance. We want machine names for block types.
See http://drupal.org/project/block_api for details.
Comment #5
sunComment #6
sun@EclipseGc: This issue is quite old -- is this still the plan? If not, let's won't fix it. :)
Comment #7
EclipseGc CreditAttribution: EclipseGc commentedCurrently in D8, I'm using UUIDs for this, I would be 100% ok with moving that over to a machine name (and I think it'd be fairly easy). That would likely be a better method ultimately, but I wanted to play with UUID when I started, and that code is still hanging around. Open for debate.
Kris
Comment #8
sunWell, if we turn custom blocks into true entities, then they will have a serial ID and a UUID due to #1637370: Add UUID support to core entity types
Comment #9
EclipseGc CreditAttribution: EclipseGc commentedSure, but since we're allowing multiple instances of any block, it's still relevant (even outside of entity driven blocks)
Comment #10
sunComment #11
EclipseGc CreditAttribution: EclipseGc commentedok, so machine_names seem to be shaping up to be instance specific, which is to say we actually name the CMI object, not the block. As we move to custom block entities, a UUID for the entity will cover the needs from that angle. Since all of this is sort of panning out differently (and in other issues) it has been pointed out that this issue could probably be closed. Hopefully this explanation is sufficient.
Eclipse