テーマシステム(Twig)を開発するための設定方法
Twig開発用の設定
OTHER FAQ
カテゴリ![]() |
Core Ver. | 関連モジュール | タイトル |
---|---|---|---|
コンテンツの管理 | 8.9.x | 写真の変更を行いたい | |
コンテンツの管理 | 7.38 | Block Views node | ノードページの編集タブをコンテキストメニューにしたい |
コンテンツの管理 | 8.9.x | Dialog Modal Canvas | drupal 8 の標準機能のダイアログ/ポップアップを表示する方法 |
コンテンツの管理 | 8.4x | Action | カスタムアクションを作成する方法 |
コンテンツの管理 | 7.15 | Content Access | 簡単に閲覧制限を行うには? |
コンテンツの管理 | 8.5.x | Field File | コンテンツのフィールドの表示について |
コンテンツの管理 | 8.4x | Entity | EntityをPropertyで探す(クエリする)方法 |
コンテンツの管理 | 7,51 | Views Data Export | Views Data ExportでCSVデータが欠けてしまう |
コンテンツの管理 | 7.16 | PHP | 好きなところにノードを埋め込みたい |
コンテンツの管理 | 7.15 | Views Bulk Operation | 標準のコンテンツ編集/ユーザ一覧ページが物足りません |
コンテンツの管理 | 7.15 | Pagenation | 一つの長いページをBookなどのように連続して読ませることはできますか? |
コンテンツの作成 | 7.22 | node Views | ノードに付いたコメントに関する情報を得る |
コンテンツの作成 | 7.38 | Views | CSV出力にHTMLが入ってしまう |
コンテンツの作成 | 7.50 | Code per Node | ページ毎にCSSやJSを設定したい |
コンテンツの作成 | 7.34 | ajax | 標準のajaxフォーム(複数値:値の数=無制限)の制御l方法 |
コンテンツの作成 | 8.9.x | Display sweet, Views, Twig Tweak, Views field formatter | テーマに頼らず コンテンツのフィールドとしてViewsを埋め込み表示する方法 |
コンテンツの作成 | 7.38 | CKEditor | 突然GoogleMap内の経路がずれてしまった |
コンテンツの作成 | 8.4x | Download | とにかく何でもコンテンツをダウンロードさせる方法 |
コンテンツの作成 | 7.15 | Darty Form | 編集ページでの操作ミス |
コンテンツの作成 | 7.26 | Form Ajax | 入力フォームで#ajax使用時、#default_valueを書き換えても反映しない |
コメント
■ 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
ページ