テーマの適用方法設定 HeadWithFooterThemeBuilder¶
概要¶
テーマの適用方法を決定するための設定を行います。テーマの適用方法そのものについては「テーマの仕組み 」を参照してください。この設定ファイルに記述されたパスにマッチしたリクエストに対して、head, body, footer を含んだ HTML を生成します。<div>theme-head-with-footer-path-config</div>上記のようなコンテンツに対してこのページビルダーを適用すると<!DOCTYPE html> <html lang="ja"> <head> <meta charset="utf-8" /> ... </head> <body> <div id="imui-container"> <div>theme-head-with-footer-path-config</div> </div> <footer id="imui-footer"> ... </footer> </body> </html>のように DOCTYPE, html, head, footer タグと、body タグにコンテンツが埋め込まれた HTML が生成され、クライアントに送信されます。body は、<div id=”imui-container”> で囲まれて出力されます。header は含まれません。
モジュール UI基本モジュール フォーマットファイル(xsd) WEB-INF/schema/theme-head-with-footer-path-config.xsd 設定場所 WEB-INF/conf/theme-head-with-footer-path-config/*.xml <?xml version="1.0" encoding="UTF-8"?> <theme-head-with-footer-path-config xmlns="http://www.intra-mart.jp/theme/theme-head-with-footer-path-config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.intra-mart.jp/theme/theme-head-with-footer-path-config ../../schema/theme-head-with-footer-path-config.xsd"> <path/> </theme-head-with-footer-path-config>
リファレンス¶
パスの設定¶
タグ名 path head, body, footer を含んだ HTML を生成します。header (メニューや、ユーティリティ)を表示したくないが、footer は表示したい場合に使用します。regex=”false” を指定した場合、または regex を指定しない場合、静的にパスを指定したことになります。regex=”true” を指定した場合、正規表現でマッチするパスを指定したことになります。例えば、下記【設定項目】のような設定を行った場合
マッチする
- /somewhere/page
- /regex/foo/foo-detail
マッチしない
- /another/page
- /regex/foo/bar-detail
のようになります。【設定項目】
<?xml version="1.0" encoding="UTF-8"?> <theme-head-with-footer-path-config> <path>/somewhere/page</path> <path regex="true">/regex/([^/]+)/\1-detail</path> </theme-head-with-footer-path-config>
必須項目 × 複数設定 ○ 設定値・設定する内容 マッピングを行うURL 単位・型 なし 省略時のデフォルト値 なし 親タグ theme-head-with-footer-path-config 【属性】
属性名 説明 必須 デフォルト値 regex パスの内容が正規表現で書かれているかを指定します。値に true を記述することで、タグの値が正規表現として扱われます。× false