Describe your issue or idea
I'm trying to create some blocks for taxonomy term pages, but in all instances I'm unable to access the term from context. Here's my code:
/**
* Implementation of hook_block_view().
*/
function customblocks_block_view($delta = '', $settings = array(), $contexts = array()) {
dpm($contexts);
}
I've also tried adding this block onto a node/%
layout as well as a user/%
layout, with the same effect.
At first I was worried this may be related to https://github.com/backdrop/backdrop/pull/1906, but it looks like that PR does not affect the behavior of hook_block_view()
but only it's _alter()
counterpart.
Steps to reproduce (if reporting a bug)
- Create a custom module using the block hooks
_info
and_view
- Place the block on a node, user, or term layout.
- View the layout.
Actual behavior (if reporting a bug)
No contexts are available.
Expected behavior (if reporting a bug)
Contexts should be available.
Relevant version/system information (if applicable)
Backdrop 1.9
Recent comments
Hello, @yorkshirepudding! Thanks a lot, I got it, all sorted out.
My layout template (layout--blog.tpl.php) doesn't work
Hi @Gnome and welcome to Backdrop When I create custom layout templates I put them in /layouts/custom/my_layout Note: you can split modules and layouts between contrib and custom...
My layout template (layout--blog.tpl.php) doesn't work
This post explains how to do this in Drupal 7. In Backdrop, File Entity is already part of core. You will need to download and install module Views Field View. https://drupal.stackexchange...
I Need to Display an Image in a View that was Uploaded to a Webform