JSON-T Predicates
Predicates are special Directives used like sections, except they don't correspond to a variable in the context. They allow you to test for certain system defined features.
The format for a predicate is {.predicate-name?} ... {.end}. You can generally spot a predicate by the trailing question mark.
Collection Predicates
These tags are used in collection template files (.list, .item).
Main Image Predicate
Code
Tests the presence of a Main Image for a collection or item.
Excerpt Predicate
Code
Tests the presence an excerpt for an item.
Comments Enabled Predicate
Code
Tests if comments are enabled for a particular item.
Disqus Enabled Predicate
Code
Test is Disqus comments have been enabled (only useful in items with comments enabled).
Video Predicate
Code
Tests if an item within a Gallery Collection is a video.
Even Predicate
Code
Tests if an item's index position is even.
Odd Predicate
Code
Tests if an item's index position is odd.
Equal Predicate
Code
Tests if two alpha-numeric arguments are equal. If true, anything between the condition {.equal?} and {.end} will be output. If either of your arguments may contain spaces, use a delimiter other than a space to ensure an accurate return. For example: {.equal?:arg1:arg2}.
Navigation Predicates
These predicates are only used within navigation (.block) files.
Collection Predicate
Code
Tests if a navigation item is a collection.
External Link Predicate
Code
Tests if a navigation item is an external link.
Folder Predicate
Code
Tests if a navigation item is a folder.