テーマシステム(Twig)を開発するための設定方法
Twig開発用の設定
OTHER FAQ
カテゴリ | Core Ver. | 関連モジュール | タイトル |
---|---|---|---|
コンテンツの作成 | 7.31 | CKEditor | CKEditorの新規生成ダイアログ内の初期値の変更 |
コンテンツの作成 | 7.50 | Inline Entity Form | Drupal6のフィールドグループのようなモジュールはありませんか? |
コンテンツの作成 | 8.7.x | CkEditor | CKEditorエディタ内に Colorboxポップアップ を簡単に挿入する方法 |
コンテンツの作成 | 7.38 | CKEditor | CKEditorの「ソース」に入力したタグが消える |
コンテンツの作成 | 7.50 | Expanding Textareas | Textareaフォームの行サイズを自動調整するモジュール |
コンテンツの作成 | 7.38 | node form | ノード編集フォームをテーブル表示形式にしたい |
コンテンツの作成 | 8.4x | node | node保存前に色々やる方法 |
コンテンツの作成 | 7.15 | Darty Form | 編集ページでの操作ミス |
コンテンツの作成 | 8.4x | json | jQueryにjsonで渡す方法 |
コンテンツの作成 | 7.15 | Form API Validation | フォームの入力内容を細かくチェックしたい |
コンテンツの作成 | 8.9.x | CKEditor | CKEditor編集中の見た目をフロントと全く同様にする方法 |
コンテンツの作成 | 7.26 | CKEditor Views | Viewsでティザーを一覧するとページのレイアウトが崩れることがある |
コンテンツの作成 | 8.4x | archiver | zipファイル圧縮・解凍する方法 |
コンテンツの作成 | 6.x | Insert Block | ブロックの内容を本文中に表示するには? |
コンテンツの作成 | 7.34 | ajax | 標準のajaxフォーム(複数値:値の数=無制限)の制御l方法 |
コンテンツの作成 | 7.38 | Views | CSV出力にHTMLが入ってしまう |
コンテンツの作成 | 8.9.x | node | ノード保存時の前回値の参照方法 |
コンテンツの作成 | 7.38 | CKEditor | 突然GoogleMap内の経路がずれてしまった |
コンテンツの作成 | 8.9.x | vim nkf | ファイルのエンコーディングを確認、変更する方法 |
コンテンツの作成 | 7.34 | Entityreference prepopulate | 新規ノード作成時のリファレンス方法 |
コメント
■ 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
ページ