geerlingguy / jeffgeerling-com

Drupal Codebase for JeffGeerling.com
https://www.jeffgeerling.com
GNU General Public License v2.0
40 stars 2 forks source link

Create 'Further reading' block with three related Blog Posts on bottom of Blog Post page #2

Closed geerlingguy closed 4 years ago

geerlingguy commented 4 years ago

This requires Apache Solr to be set up, and search suggestions.

The code to add a node_bottom region to the theme from Drupal 7 was:

/**
 * Implements template_preprocess_node().
 */
function jeffgeerling_preprocess_node(&$variables) {
  // Make the 'node_bottom' region available.
  if ($blocks = block_get_blocks_by_region('node_bottom')) {
    $variables['region']['node_bottom'] = $blocks;
  }
  else {
    $variables['region']['node_bottom'] = array();
  }
}
geerlingguy commented 4 years ago

Blocked by #54

geerlingguy commented 4 years ago

Sweet! Thanks in part to this post from Aten design, I was able to get the block to show up in the bottom of the node, but above the tags and links.

geerlingguy commented 4 years ago
Screen Shot 2020-05-05 at 5 04 15 PM