When making custom clocks, often there are already existing blocks that gives the desired result, but we need to make a slight change, for example in the sort order or the like. Or, only to get a block that does not have the title with it... (another reported issue is set to "postponed" about this).
I suggest providing an extra field in the configure view of non-custom blocks, a way to get hold of the code that the blocks use to produce their result. Simply to be able to study it or copy it into a new custom block to make some variation.
This is especially practical for non-programmers that find it hard or "impossible" to get hold of the code of existing blocks.
(PS. It is not realistic/practical to try to ensure they are "all" documented in the block snippets section of the handbook, as this is relevant for any blocks, including those that is provided by contributed modules.)
Comments
Comment #1
ultraBoy commentedEven if that's possible, that may be useless also, because developers can just call special function to generate block's content.
To change the code user just needs to see hook_block() function and copy that code. But sometimes that can be more complicated...
Comment #2
Leeteq commentedHm? I cannot seem to make sense of your answer, did you read what the issue was really about?
It is a suggestion for a feature that will let content managers who are not programmers get an easy way to make new block variations without having to know a lot about Drupal's inner workings, only some superficial PHP understanding, which I think is quite a lot of people.
Would be ok if we leave this issue open for a bit so others can be inspired to chime in with their thoughts and comments about it.
Comment #3
ultraBoy commentedOkay, but my point is still that you solution won't help in most cases. Better to write an article in handbook about where to see that code.
Comment #4
pasquallethis feature needs practical examples to get accepted
Comment #5
mdupontOld issue without much activity, the exposed use case is too specific for this feature to be considered to core (people knowing a bit of PHP will be able to look at hook_block() code, others will use the UI of Views or another module).