When exiting Argentina and entering Bolivia on La Quiaca/Villazón border I didn’t get the entry stamp on Bolivian side. That’s because the two countries have some type of tourism agreement. So technically Argentina grants you permission to enter Bolivia. It confused me especially because my Spanish is quite basic. I got 30 days tourist visa.… Continue reading Entering Bolivia without passport entry stamp
Notes
A list of Counties in Ireland
Drupal 8 kint() doens’t work
I noticed that kint() function doesn’t work on a fresh Drupal 8 installation. The solution is to uninstall BigPipe module, that comes preinstalled in the latest version of Drupal. BigPipe is a caching technique that interferes with how kint() works.
WordPress post remove categories taxonomy
function alter_taxonomy_for_post() { unregister_taxonomy_for_object_type(‘category’, ‘post’); //register_taxonomy_for_object_type(‘custom_tax’, ‘post’);}add_action(‘init’, ‘alter_taxonomy_for_post’);
Adding node-id CSS class in Drupal 8
Let say that we’d like to add a node-id-1 CSS class name to the HTML tag. (Ideally, the front-end should not depend on node ids, however, sometimes it’s the best approach) Add a pre-processor to the theme file. Note that the preprocess function doesn’t know what the current node is, therefore you need to call \Drupal::routeMatch() function… Continue reading Adding node-id CSS class in Drupal 8
GreenSock hover over starter
Hover effects $(“.video”).hover( function () { TweenLite.to($(“.overlay .fa”, this), 0.3, {y: -15, ease: Power2.easeInOut}); }, function () { TweenLite.to($(“.overlay .fa”, this), 0.3, {y: 0, ease: Power2.easeInOut}); } );
WordPress development workflow
WordPress + Bootstrap + Visual Composer For most of the standard websites, I use the following workflow. Generate a WordPress starter theme in Underscores. Upload and activate the theme. Install and activate Visual Composer plugin (I’m slowly adapting the Guttenberg plugin instead). Import Bootstrap to the theme folder. Import Visual Composer fix that integrates the… Continue reading WordPress development workflow
Drupal 8, getting paragraph parent
function hook_suggestions_paragraph_alter(array &$suggestions, array $variables, $hook) { $parent = $variables[‘elements’][‘#paragraph’]->getParentEntity()->bundle(); if($parent){ $paragraph = $variables[‘elements’][‘#paragraph’]; $sanitized_view_mode = strtr($variables[‘elements’][‘#view_mode’], ‘.’, ‘_’); //$suggestions[] = ‘paragraph__’ . $sanitized_view_mode; //$suggestions[] = ‘paragraph__’ . $paragraph->bundle(); //$suggestions[] = ‘paragraph__’ . $paragraph->bundle() . ‘__’ . $sanitized_view_mode; $suggestions[] = ‘paragraph__’ . $paragraph->bundle() . ‘__’ . $sanitized_view_mode . ‘__parent_’ . $parent; }}
Custom plyr.io icons
In this example I’m developing a simple play/pause button using svg sprite technique. const rt = Plyr.setup(‘.audio’, { debug: true, controls: [ ‘play’ ], iconUrl: ‘path/sprite.svg’, iconPrefix: ‘audio’}); The sprite is an svg file that includes an svg icons for play and pause. You need to add the ids to the layers. It’s required by… Continue reading Custom plyr.io icons
Drupal 8 display webform programmatically
$view_builder = \Drupal::entityTypeManager()->getViewBuilder(‘webform’); $storage = \Drupal::entityTypeManager()->getStorage(‘webform’); $node = $storage->load(‘contact’); $build = $view_builder->view($node); $output = render($build);