Thanks to visit codestin.com
Credit goes to github.com

Skip to content

lyalyuk/drupal-project

 
 

Repository files navigation

TWIG Demo

Requirements

Install site

  • Set up site, site host, create database with name twig as usual.
  • cd /path/to/site
  • git clone https://github.com/lyalyuk/drupal-project.git .
  • Edit /path/to/site/web/sites/default/settings.php (rows 757-759) For your database credentials.
  • composer install
  • cd /path/to/site/web. Note: For Windows use backslashes ""
  • ../vendor/bin/drush si minimal --account-name=admin --account-pass=developer -y (Note: For Windows use backslashes "")

Update via composer and phing

(Note: For Windows use backslashes "")

  • cd /path/to/site
  • vendor/bin/phing

Plan

  1. Theme Structure
  • twig_demo.info.yml, libraries, theme, folders
  • twig_libraries.info.yml
  • twig_libraries.theme
  • Common theme folders
  1. Templates
  • Templates hierarchy HTML > Page > Region > Container > Block / Node / Comment / Form / Paragraph > Layout / Fields / Region / Links / Menu etc.
  • Template debug - {{ dump() }}
    • install kint using
      • cd path/to/site/web
      • drush en kint
  • Template files overview
    • page.html.twig
    • block.html.twig
    • node.html.twig
    • comment.html.twig
    • form.html.twig
    • ...
  1. Twig Introduction
  1. Twig Js

About

Drupal 8 Twig demo

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CSS 40.4%
  • HTML 34.7%
  • PHP 24.3%
  • Other 0.6%