2016-08-05 10 views
-1

これはどのように可能ですか?ifステートメント内の変数ifyを連想させる

これは問題ではありません。

{if $date.today.start eq $filter.selected} selected="selected" {/if} 

しかし、私はこれが可能であるか疑問? (ifステートメントの変数の連結)

{if {$date.today.start}|{$date.today.end} eq $filter.selected} selected="selected" {/if} 

これは構文エラーです。

だから、それはどのように私は "パイプ" と別の変数$date.today.end

$date.today.startを組み合わせることが可能である:IF文で

{$date.today.start}|{$date.today.end} 

答えて

0

自分で解決策を見つけました。

{if $date.today.start|cat:'|'|cat:$date.today.end eq $filter.selected} selected="selected" {/if} 

"猫" は、この問題を解決することができます

関連する問題