Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When looking at the API documentation in hook_ds_fields_info()
for the block
properties you'll find it described as:
// block: the module and delta of the block, only for block fields.
'block' => 'user-menu',
Showing that the block is defined as "[module]-[delta]" (as is consistent with the block API), however the rendering function uses a pipe to split the module from the delta.
/**
* Render a block field.
*/
function ds_render_block_field($field) {
// Invoke the block_view hook of the module.
list($module, $delta) = explode('|', $field['properties']['block']);
$block = module_invoke($module, 'block_view', $delta);
Since changing the format will break the API, I'd opt to only change the documentation for the 7.x-2.x line.
Comment | File | Size | Author |
---|---|---|---|
#1 | ds-incorrect_api_documentation-2492661-1.patch | 592 bytes | Erik Frèrejean |
Comments
Comment #1
Erik FrèrejeanAttached a patch, that changes the documentation.
Comment #2
Erik FrèrejeanComment #4
aspilicious CreditAttribution: aspilicious commented