0 votes

I see that your template engine does nested [foreach]. that is fantastic.

Does it do [if xxx=yyy] [else] [end]?

You should consider selling your template engine as a separate product. It is as nice as anything I have seen.

by

1 Answer

0 votes

Does it do [if xxx=yyy] [else] [end]?

No, only boolean properties are supported. You need to expose xxx==yyy expression as a property on the data object:

public bool IsYYY 
{ 
    get { return xxx=="yyy"; }
}

This is done by design to force developers not to code too much in the template itself, but rather create a rich testable ViewModel.

by (297k points)
...