I take it back. I never allowed formatters in sections. Nor do I
(currently) allow node-b without the predicate.

So currently, this is what I have working:

{.section node-a} -- predicate function 'true' applied to node-a
{.section node-a predicate?} -- predicate applied to node-a
{.section node-a node-b|predicate?} -- predicate applied to node-b

So my only real addition is that the predicate can be applied to a
different node of the json than is used for the scoping. Another
possible syntax could be:

{.section node-a} -- predicate function 'true' applied to node-a
{.section node-a .if predicate} -- predicate applied to node-a
{.section node-a .if node-b|predicate} -- predicate applied to node-b

or

{.section node-a} -- predicate function 'true' applied to node-a
{.section node-a if:predicate} -- predicate applied to node-a
{.section node-a if:node-b|predicate} -- predicate applied to node-b

or

{.section node-a} -- predicate function 'true' applied to node-a
{.section node-a if predicate} -- predicate applied to node-a
{.section node-a if node-b|predicate} -- predicate applied to node-b

I could do without the | and just use space for the last ones:

{.section node-a node-b predicate?} -- predicate applied to node-b
{.section node-a .if node-b predicate} -- predicate applied to node-b
{.section node-a if:node-b predicate} -- predicate applied to node-b
{.section node-a if node-b predicate} -- predicate applied to node-b


Examples of the last one and letting the predicate function take
params:

{.section <scope> if <predicate-scope> <predicate>}

{.section post if moderator}
{.section post if moderator true}
{.section post if role is "moderator"}

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to