- composer - https://getcomposer.org/download/
- git
- web server (Apache is preffered. But you can use any.)
- 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 "")
(Note: For Windows use backslashes "")
cd /path/to/site
vendor/bin/phing
- Theme Structure
- twig_demo.info.yml, libraries, theme, folders
- twig_libraries.info.yml
- twig_libraries.theme
- Common theme folders
- 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
- install kint using
- Template files overview
- page.html.twig
- block.html.twig
- node.html.twig
- comment.html.twig
- form.html.twig
- ...
- Twig Introduction
- see /web/themes/custom/twig_demo/templates/views/views-view-unformatted--main-slider.html.twig
- Read http://twig.sensiolabs.org/doc/2.x/templates.html
- Twig Js