Skip to main content

Posts

Showing posts from December, 2018

Views Template rendering in Drupal 8

File name suggessations are as follows:  [base template name]--[view machine name]--[view display id].html.twig [base template name]--[view machine name]--[view display type].html.twig [base template name]--[view display type].html.twig [base template name]--[view machine name].html.twig [base template name].html.twig example I used for an "unformatted list" with machine name "view_name" and with a single block, "block_1" views-view-unformatted--view-name--block-1.html.twig Custom Theme template with modules module name = product_view Add .module file /**  * Implements hook_theme().  */ function product_view_theme() {   return [     'product_view' => [       'variables' => [         'product_info' => [],       ],     ],   ]; } In controller return the theme with data:: $aa = array ( 'name' => 'raj' , 'age' => 20 );...