Posts

Showing posts from January, 2021

Commerce Drupal

 Checkout flow => Order types => Order item types => Production variation type => Product type Except Checkout flow eveything can be cloned.

D8 snippets

Search Drupal all source code http://grep.xnddx.ru/  Programmtically load a views block         use Drupal\block\ Entity ;         $block = \Drupal\block\Entity\Block::load('views_block__who_s_online_who_s_online_block');         $block_content = \Drupal::entityManager()           ->getViewBuilder('block')           ->view($block); Make sure the block is loaded via block management in the region via UI and keep it disabled. https://drupal.stackexchange.com/questions/171686/how-can-i-programmatically-display-a-block  Useful twig functions wrapper https://www.drupal.org/project/twig_tweak Machine name of the block Click "Configure" on the specific block in block management page and you can get the machine name of the block. Example: views_block__e_books_home_e_books_home_block  To get the list of all blocks > bin/drush ev "print_r(array_keys(\Drupal::servi...