> The goal would be to write your thing as:
>
> {.section post}
> Title: {title}
> Body: {body}
> {section @ is-moderator?} <-- The problem here is that the
> predicate is passed "post" and has no other context
> <button id="{id}">
> {.end}
> {.end}
Actually, I add a few extras like parent and index:
{.section post}
Title: {title}
Body: {body}
{section @ @.parent.is-moderator?}
<button id="{id}">
{.end}
{.end}
> > So the logic goes in the app instead of the template. The philosophy
> > is to put "business logic" in the app and the template only deals with
> > display. I would be interested to see how you would do this in other
> > template languages.
Yes, when I am doing both, that works. If it is two different people,
then it doesn't.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "JSON
Template" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/json-template?hl=en
-~----------~----~----~----~------~----~------~--~---