jehugaleahsa / mustache-sharp

An extension of the mustache text template engine for .NET.
The Unlicense
306 stars 78 forks source link

If ... Or ... #69

Open c5racing opened 8 years ago

c5racing commented 8 years ago

Is there any capability to do an If... Or... such as:

Hello {{#if {{Man}} || {{Boy}}Mr.{{#else}}Mrs.{{/if}} Smith!

jehugaleahsa commented 8 years ago

If there isn't a lot of text in a branch, duplicate the text in an #elseif. Else, create a IsMale property and use that. That's the best you can do right now.

On Sep 27, 2016 3:01 PM, "c5racing" notifications@github.com wrote:

Is there any capability to do an If... Or... such as:

Hello {{#if {{Man}} || {{Boy}}Mr.{{#else}}Mrs.{{/if}} Smith!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jehugaleahsa/mustache-sharp/issues/69, or mute the thread https://github.com/notifications/unsubscribe-auth/ABTgPuGevdAzlw8P_qY_uvE_SmK7vo0dks5quWgEgaJpZM4KICOB .

c5racing commented 8 years ago

That's what I assumed. i have substantial duplicated text The IsMan and IsBoy was just an example so the IsMale suggestion won't work in my case.

Thanks!