私の風景: Drupal 7 に Omega テーマがインストールされています。
私の問題: CSS (セクションヘッダー) の特定のゾーンにランダムな背景を設定する必要があります。レスポンシブ デザインのため、4 つの個別の css ファイルがあり、ファイル名は同じですが、唯一の違いは _mobile _narrow _normal _wide という接尾辞です。いくつかの単純な行を使用して、css ファイルに背景を設定しました。
#section-header {
background: url(../images/sf_header_wide.jpg) no-repeat top center;
height: 390px;
margin: 0;
padding: 0;
}
背景に複数の画像を追加する必要があります。外部ソース (たとえば、私のテンプレート php ファイル) からファイル名をインポートして、背景行を追加せずにこのようなものを取得できるかどうかを知りたいです。レスポンシブ デザイン用の css ファイルを分離したため、template.php ファイル
#section-header {
background: url("../images/<?php echo $fileimage; ?>_wide") no-repeat;
height: 390px;
margin: 0;
padding: 0;
}
私が必要とするものを手に入れることは可能ですか?