Drual 8 Theming Cheat Sheet

Drupal 8 Path to theme url

example: <img src=”{{ base_path ~ directory }}/images/logo.png” >

Drupal Field value for link/url and link text
Drupal Moduel: Honeypot

module for spam filter, CAPTCHA alternative. https://www.drupal.org/project/honeypot

drupal module: Metatag

add metatag to every post. https://www.drupal.org/project/metatag

Drupal Module: Video Embed Field

Allow youtube, vimeo, etc to embed from URL https://www.drupal.org/project/video_embed_field

Drupal Module: Menu Links Attributes

allow to add attributes to menu link

https://www.drupal.org/project/menu_link_attributes

Drupal Module: Contact Storage

store contact data from contact form

https://www.drupal.org/project/contact_storage

Drupal Module

Contact Block: https://www.drupal.org/project/contact_block

simple contact form as a block

Drupal Module allow php javascript html etc
Twig Tool Drupal Module

https://www.drupal.org/project/components quick variable name of template

Drupla Module Lightbox

https://www.drupal.org/project/colorbox Module to allow pop up lightbox effect

Drupal Module to Group Fields
Drupal Module to add dropdown menu link

https://www.drupal.org/project/admin_toolbar

Allow drop down link on admin

Admin Toolbar Extra Tools

Drupal Upload / Browse File on Server
Drupal 8 Conditional Statement

example of drupal 8 if else statement

Echo or show a region in Drupal 8

change ‘body’ with your region name

Echo/show field value Drupal 8
Echo/show a block in Drupal 8

xxx is your block name

Drupal Repeater / Field Collection
Drupal Includes