テーマシステム(Twig)を開発するための設定方法
Twig開発用の設定
OTHER FAQ
カテゴリ | Core Ver. | 関連モジュール | タイトル |
---|---|---|---|
フォーム | 7.38 | Webform | Webformでタクソノミーを参照したい |
コンテンツの作成 | 7.38 | Webform | Webformでテーブル形式にしたい |
フォーム | 7.15 | Webform | Webformで確認画面 |
フォーム | 8.7.x | Webform | WebformのCheckboxの要素にて表記の変更 |
フォーム | 7.15 | Webform | WebformのEntity Translation |
フォーム | 7.15 | Webform Template | Webformを複写したい |
サイトの構築 | 8.3x | Webform | Webformモジュール メールアドレスの入力ミス確認 |
フォーム | 7.38 | Webform | Webformモジュールをアップデートしたら「このフィールドを入力してください」 |
PHP | 8.9.x | PHP | YamlをPHP配列にする方法 |
サイトの環境設定 | 8.6.x | Simhony Yaml | yamlファイルを読み込む方法 |
コンテンツの作成 | 8.4x | archiver | zipファイル圧縮・解凍する方法 |
パフォーマンス | 7.34 | Server | お金をかけないで冗長化するには |
サイトの環境設定 | 7.59 | さくらのレンタルサーバー php Options | さくらのレンタルサーバーで パブリック/プライベートディレクトリにファイルが書き込まれないとき |
コンテンツの作成 | 8.4x | Download | とにかく何でもコンテンツをダウンロードさせる方法 |
ブロック | 7.15 | Views | ひとつのViewsをページやブックページ中で再利用する方法は? |
言語 | 7.15 | Language | まだ翻訳されていない英語文、どうにかならない? |
Commerce | 8.6.x | Commerce Payment Gateway | オリジナルCommerce決済モジュール(Offsite)で決済サーバーへのPOST時のエンコードを変更する方法 |
token | 7.34 | token | オリジナルモジュールからtokenを提供する方法を教えて下さい。 |
コンテンツの管理 | 8.4x | Action | カスタムアクションを作成する方法 |
Token | 8.4x | Token | カスタムモジュールからtokenを提供する方法(drupal8版) |
コメント
■ 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
ページ