テーマシステム(Twig)を開発するための設定方法
Twig開発用の設定
OTHER FAQ
カテゴリ | Core Ver. | 関連モジュール | タイトル |
---|---|---|---|
フォーム | 7.15 | Webform | Webformで確認画面 |
フォーム | 7.15 | Webform | Webform - 確認ページの多言語化 |
アップデート | 7.15 | Webform Backup_and_Migrate | drupal7.12 -> drupal7.14アップデートメモ |
フォーム | 7.15 | Webform Template | Webformを複写したい |
Japanese mail | 7.15 | Webform, Mail System, Mime Mail, Japanese Mail Helper | Webformから文字化けしないメール送信を行うには |
フォーム | 7.16 | Webform, Mail System, Mime Mail, Jp Mail Helper | 送信メールのサブジェクトが長いと文字化けする |
サイトの環境設定 | 7.59 | さくらのレンタルサーバー php Options | さくらのレンタルサーバーで パブリック/プライベートディレクトリにファイルが書き込まれないとき |
コメント
■ 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
ページ