URLに特定の文字列がある場合は、ボディにクラスを追加する方法を探しています。ボディクラスを示す条件付きの枝/木材
種類の論理作業を持っている私が、次の構文: 1が原因の 2サイクルのみ最初の繰り返し乾燥していない私は、私は何とか配列を配置する必要があると思う
if文'if'ステートメントの後には書かれていますが、構文についてはわかりません。 ご協力いただければ幸いです。あなたはこれを解決する新しいフィルタを作成することができ おかげ
{% if 'bus-data' in post.link %}
<body class="{{body_class}} jumbo" data-template="base.twig">
{% elseif 'bus-data' not in post.link %}
<body class="{{body_class}}" data-template="base.twig">
{% endif %}
{% if 'taxi-data' in post.link %}
<body class="{{body_class}} jumbo" data-template="base.twig">
{% elseif 'taxi-data' not in post.link %}
<body class="{{body_class}}" data-template="base.twig">
{% endif %}
{% if 'education-data' in post.link %}
<body class="{{body_class}} jumbo" data-template="base.twig">
{% elseif 'education-data' not in post.link %}
<body class="{{body_class}}" data-template="base.twig">
{% endif %}
{% if 'public-data' in post.link %}
<body class="{{body_class}} jumbo" data-template="base.twig">
{% elseif 'public-data' not in post.link %}
<body class="{{body_class}}" data-template="base.twig">
{% endif %}
おかげで - 私は「木材」構文にこれを実装する方法を正確に確認されませんでしたが。私は以下の簡単な解決策を探しました。 –