Libraries |
8.5.x |
Libraries |
Commerceで外部JavaScriptをテスト/本番で読み分ける方法 |
言語 |
7.15 |
Language |
まだ翻訳されていない英語文、どうにかならない? |
コンテンツの作成 |
8.4x |
json |
jQueryにjsonで渡す方法 |
見栄え |
7.15 |
js Injector |
簡単にJavascriptを追加する方法は? |
GoogleMaps |
7.28 |
Javascript |
IE9でGoogle Map APIを利用した住所情報所得がうまくゆかない |
サイト情報 |
8.4x |
JavaScript |
JavaScriptに変数を渡す方法 |
フォーム |
8.6.x |
JavaScript |
特定のformにJavaScriptを紐付ける方法 |
フォーム |
8.6.x |
JavaScript |
特定のformに動的にJavaScriptをロードする方法 |
ユーザ |
7.34 |
ip_ranges |
ログインアタック対策は? |
コンテンツの作成 |
6.x |
Insert Block |
ブロックの内容を本文中に表示するには? |
コンテンツの作成 |
7.50 |
Inline Entity Form |
Drupal6のフィールドグループのようなモジュールはありませんか? |
サイトの環境設定 |
7.23 |
Image Style |
画像スタイルの使い方(Crop) |
言語 |
6.x |
i18n |
多言語対応サイトのサイト名やスローガン/ミッションなどを多言語化する方法を教えてください |
Views |
8.4x |
hook_views_query_alter |
Viewsクエリの条件式にサブクエリを追加する方法 |
Views |
8.4x |
hook_views_query_alter |
Viewsクエリに多くの条件を追加する方法 |
Views |
8.4x |
hook_views_query_alter |
現在のViewsクエリを保存・再現する方法 |
Views Exposed Filter |
8.4x |
hook_views_pre_view |
Views Exposed Formの複数単語入力(textfield)をフォーム上だけ複数行入力(textarea)にする方法 |
テーマ |
8.4x |
hook_preprocess_html |
bodyタグにnode idやaliasのClassを追加する方法 |
テーマ |
7.23 |
hook |
ページや状況によってテーマを切り替える |
タクソノミー |
7.15 |
Hirarchical Select |
タクソノミー(ターム)の選択を楽にできないでしょうか |
コメント
■ settings.local.phpを作成する
パーマリンク Submitted by actbrain on 2017/10/20 01:52.
■ settings.local.phpを作成する
$ cd /path/to/document-root/sites/default
$ cp ../example.settings.local.php settings.local.php
■ settings.local.php から development.service.yml を読み込むようにする
$ cd /path/to/document-root/sites/default
$ vim settings.local.php
$ diff -upN ../example.settings.local.php settings.local.php
〜
-# $settings['container_yamls'][] = DRUPAL_ROOT . '/sites/development.services.yml';
+$settings['container_yamls'][] = DRUPAL_ROOT . '/sites/development.services.yml';
〜
-# $settings['cache']['bins']['render'] = 'cache.backend.null';
+$settings['cache']['bins']['render'] = 'cache.backend.null';
〜
-# $settings['cache']['bins']['discovery_migration'] = 'cache.backend.memory';
+$settings['cache']['bins']['discovery_migration'] = 'cache.backend.memory';
〜
+$settings['file_private_path'] = '/path/to/private'; // ついでにプライベートディレクトリを定義する
■ development.service.yml にデバッグ用設定を追加する
$ cd /path/to/document-root/sites/default
$ vim ../development.services.yml
〜以下の行を追加する
parameters:
http.response.debug_cacheability_headers: true
twig.config:
debug: true
auto_reload: true
cache: false
〜
■ settings.php から settings.local.php を読み込むようにする
$ cd /path/to/document-root/sites/default
$ vim setting.php
$ diff -upN default.settings.php settings.php
〜
-# if (file_exists($app_root . '/' . $site_path . '/settings.local.php')) {
-# include $app_root . '/' . $site_path . '/settings.local.php';
-# }
+if (file_exists($app_root . '/' . $site_path . '/settings.local.php')) {
+ include $app_root . '/' . $site_path . '/settings.local.php';
+}
〜
■ Cacheをクリアする
$ drush cr
ページ