Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
最近stringtemplateを使用していますが、StringTemplateは複雑な条件付き、類似のvalue>1またはvalue="menu"などをサポートできないことに気付きました。
StringTemplateは、意図的に複雑な条件をサポートしていません。これだけのロジックが必要な場合は、モデルとビューの分離の厳密な適用を破っていると考えられます。代わりに、表現しようとしている複雑な条件を表すテンプレート変数を使用して、代わりにそれを渡すか、正しい結果を計算するメソッドを使用してください。