Skip to content

Sample module for outputting Drupal blocks as twig variables easily.

Notifications You must be signed in to change notification settings

town-chen/custom_twig_blocks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Custom Twig Block Variables

This is a site-specific module that can help you output blocks from Drupal and Views as easy to use Twig variables.

Usage in Twig templates would just be {{ my_variable }} depending on what you define in the custom TwigBlock extended classes. Within your theme's .theme file, add in the call to your custom class to preprocess the block output into a Twig variable. A sample is provided for the .theme file.

This module is designed to be customized!

About

Sample module for outputting Drupal blocks as twig variables easily.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages