Skip to main content

Block

Drupal 8 catching

Drupal 8 block caching

The approach to custom block caching is different in Drupal 8 from Drupal 7. In Drupal 8, all renderable arrays are cacheable, even those returned by custom block.

Examples:

  • Some expensive-to-calculate data depends on the active theme: different results for different themes. Then you'd vary by the theme cache context.

knackforge blog knowledge base

How to add contextual link on a block

Contextual link is a nice addition made into Drupal 7 to favor usability. It offers, quick links to pages performing administrative operations. By default it is available for core block and node teaser view. But designed to be made extendable for other items too - Views, panels, and so.
 
Custom contextual link (aka ccl) module is the best choice for adding custom link items.
 
But I have faced some problems in ccl module while adding a custom contextual link for a block.
Subscribe to Block