Skip to content

Instantly share code, notes, and snippets.

@anavdesign
anavdesign / drupal-theme-settings.md
Last active April 15, 2018 16:59
Drupal: Advance Theme Settings

Drupal 8 Advanced Theme Settings

Apppearance Form

In Drupal 8, themes can modify the entire theme settings form by adding a PHP function to either the THEMENAME.theme file or to a theme-settings.php file. In one of those files, a theme should use THEMENAME_form_system_theme_settings_alter(&$form, $form_state) hook function.

File: theme-settings.php

@anavdesign
anavdesign / links-new-window.js
Created April 15, 2018 17:34
jQuery: Open External Links New Window
@anavdesign
anavdesign / chmod-permissions.md
Created April 15, 2018 17:59
CLI: Change Mode Permissions

Change Mode Permissions

Symbolic Notation Numeric Notation
---------- 0000 no permissions
---x--x--x 0111 execute
--w--w--w- 0222 write
--wx-wx-wx 0333 write & execute
-r--r--r-- 0444 read
-r-xr-xr-x 0555 read & execute
@anavdesign
anavdesign / drupal-themeing.md
Last active October 13, 2023 02:06
Drupal: Themeing

Drupal Themeing

Using base_path and directory variables in twig template

{{ base_path }}
{{ directory }}
{{ base_path ~ directory }}

@anavdesign
anavdesign / bower-scroll-magic-override.json
Created April 24, 2018 17:49
JS: Bower Scroll Magic Override
{
"name": "",
"version": "",
"authors": "",
"description": "",
"repository": {
"type": "git",
"url": ""
},
"license": "MIT",
@anavdesign
anavdesign / Drush.md
Last active January 29, 2019 03:39
Drupal: Drush Command Line Shell
@anavdesign
anavdesign / Remote Server Setup.md
Created January 19, 2019 20:03
Remote: Server Setup

Remote Server Setup

SSH Access

  1. Enable SSH Remote Server

  2. Import Public Key

    Copy and enable Public Key to Remote Server /.ssh/id_rsa.pub

@anavdesign
anavdesign / Drupal Site Sync.md
Created January 19, 2019 20:05
Drupal: Site Sync

Drupal Site Sync Sync

Sync Site Files

Copy local site files to remote server

# Add --delete flag ro remove any files not on source
$ drush rsync @self:%files @live:%files --delete
@anavdesign
anavdesign / Drupal Git Repo.md
Created January 19, 2019 20:05
Drupal: Git Repo