This could become an alternative solution to #1703 / #2288 (we got some feedback that a "live preview" of the block content might be considered UI bloat by some) and also solve another small WTF...
While the two other issues are about custom blocks that are the most common use case where blocks end up having the same title in the "Manage blocks" page, there is a chance that people might be placing instances of other types of blocks more than once in the same layout. So, they might end up with say two "Recent comments" blocks or two "Primary navigation" blocks etc.
The WTF I was talking about is that certain blocks have their title hidden by default (which is the equivalent of the "None" option offered in the "Block title type" drop down). So why do we offer both "default" and "none" since the default is "none". A perfect example of such a block is the header block:
I think that D8 handles this in a better way:
Slightly different issue but similarly a WTF is the fact that we have the block title type set to "default" for most blocks, but we do not explain to the user what that "default" is. I mean, how is the user supposed to know that for the header block "default" means hidden (none) and for other blocks the very same thing means showing the title? Bottom line is that "default" simply does not make sense to a beginner, non-Drupal user.
So I thought that perhaps we could do this:
- Add a required title field to the config form of all blocks. Pretty much what D8 has.
- Have that field be prefilled with the block type ("Header", "Primary navigation", "Hero", "Custom block"). This way, there will be no validation error (because the field would not be empty) and the user can skip this field most of the times. In other words, we make a required field sorta optional.
- Have a "Hidden" checkbox under that block title field. Checking this will be hiding the block title from the front-end (the equivalent of our current "None" option), but would still allow having custom block titles for use in the admin UI ("Manage blocks" page).
- If the user does not change the title field, then the block title in the "Manage blocks" page will be the same as now.
- If the user changes the title to a custom one, then we show that as the block title in the frontend (if the "Hidden" checkbox is unchecked) and in the "Manage blocks" page we could show that custom title plus append the block type in brackets. So, for example we could have "Main menu" shown in the frontend and "Main menu (Primary navigation)" shown in the admin UI. Another example would be "Monthly Promotion" in the frontend vs. "Monthly Promotion (Custom block)" in the backend.
- We require that title to be unique within each layout. This way, adding say a second custom block and leaving the title to the default ("Custom block") would throw a validation error letting the user know that a block with the same name already exists in the layout being edited. This would force the user to choose a unique title and thus #1703 / #2288 would be non-issues.
Thoughts?
Recent comments
I think given the warning on the source site: At this time, if your new project can afford to require PHP 5.5+, which it should, please use PHP's native password_hash() /...
July 31, 2025
I did a very quick test and if the Display format of the webform submission value is HTML then it appears but if plain text then it doesn't, so something is included regardless of if empty when...
"Hide rewriting if empty" has no effect
Just to clarify it appears that the item: Fix Search for "On the Web" module, is about the search on backdropcms.org at https://backdropcms.org/modules
July 31, 2025