Skip to content

Instantly share code, notes, and snippets.

View rsoutodev's full-sized avatar

Rodrigo Souto Guimarães rsoutodev

View GitHub Profile
@DATABASE@__%Y-%m-%d_%H-%M-%S
@rsoutodev
rsoutodev / twig-tweak.md
Created May 18, 2023 23:20 — forked from StevenGFX/twig-tweak.md
Twig Tweak Cheat Sheet

View

This accepts views arguments as well:

{{ drupal_view('who_s_new', 'block_1') }}

View with multiple arguments:

{{ drupal_view('who_s_new', 'block_1' 'contextarg1', 'contextarg2', '...') }}

@rsoutodev
rsoutodev / estados.php
Created May 31, 2023 01:35 — forked from ricardobarantini/estados.php
Array com nome e siglas de estados Brasileiros para select do Codeigniter
$estadosBrasileiros = array(
'AC'=>'Acre',
'AL'=>'Alagoas',
'AP'=>'Amapá',
'AM'=>'Amazonas',
'BA'=>'Bahia',
'CE'=>'Ceará',
'DF'=>'Distrito Federal',
'ES'=>'Espírito Santo',
'GO'=>'Goiás',

Introduction

In this snippet I've gathered some examples and cases about how to get taxonomy terms programmatically in Drupal, using always the same method and the same mechanics: get terms and then processing it in order to get only the required under certain criteria.

Author