Skip to content

Instantly share code, notes, and snippets.

@vkechagias
vkechagias / helpers.html.twig
Last active January 15, 2019 14:01
Drupal 8: Twig development helper snippets
{# List all available properties of field #}
{{ kint(node.field_machine_name[0].getProperties(true)) }}
@vkechagias
vkechagias / settings.local.php
Last active January 15, 2019 13:59
Drupal 8: Reduce Kint() levels through settings.local.php
/**
* Add at the bottom of the file and make sure path exists
*/
require_once DRUPAL_ROOT . '/modules/devel/kint/kint/Kint.class.php';
Kint::$maxLevels = 4;
@vkechagias
vkechagias / social-media.html
Created September 8, 2017 13:31
Style+ social media block HTML markup
<div class="social-media">
<div class="row grid-gutter-0">
<div class="col-md-3 col-xs-6">
<div class="overlay-container">
<span class="overlay overlay--visible">
<a class="overlay-target-link" href="#"></a>
<span class="overlay-caption-container">
<a href="#" class="overlay-caption overlay-caption--black">OUR BLOG</a>
</span>
</span>
@vkechagias
vkechagias / Drupal 8 installation profile
Last active June 14, 2017 13:22
Drupal installation profile generation
01. Composer drupal generator - https://github.com/drupal-composer/drupal-project
02. composer require all modules of original installation
03. Add premium theme to composer installation
04. Add sites/default/files files to composer installation
05. Import DB and clear cache
06. install install_profile_generator module with composer
07. install default_content module with composer
08. install file_entity module with composer
09. enable install_profile_generator, default_content, rest and file_entity modules
10. drush cr and cron