次の形式のエラー JSON が表示されます
error = [{field:'one', desc:'This is error for field one', value='FromPostFieldOne'},
{field:'two', desc:'This is error for field two', value='FromPostFieldTwo'}];
次のテンプレートに表示したい
{#error}
<form>
<input type="text" name="one" id="one" value="<!- value for field one from JSON-->"/>
<!-- Display error from JSON for field one here -->
<input type="text" name="two" id="two" value="<!- value for field two from JSON -->"/>
<!-- Display error from JSON for field two here -->
</form>
{/error}
「明示的なコンテキスト設定」または「{@if cond="condition"} ヘルパー」でこれを達成するかどうかはわかりません。Linkedin Dust サイトのすべての例は、オブジェクト配列ではなく JSON キー値でこれを行う方法を示しています。
助けていただければ幸いです!!!!