posts

An array of the Blog's posts to be displayed in the current view.

This array will contain exactly one item on a view where data:view.isSingleItem is true. On pages where data:view.isMultipleItems is true, the array can have any number of items.

Each item in the array is an object with the following fields:

thumbnailUrl (String) - URL of a thumbnail-sized version of the featured image for the post.
featuredImage (Image) - The featured image for the post.
id (String) - The ID of the post.
author (Object) - Object containing fields relating to the author of the post.
author.name (String) - Name of the author
author.aboutMe (String) - 'About me' description filled out by the author.
author.profileUrl (String) - URL for the profile of the post's author. Null if the author has no profile.
url (URL) - URL pointing to this post.
reactionsUrl (URL) - URL for the reactions associated with the post.
emailPostUrl (String) - URL for the reactions associated with the post.
date (Date) - Date that the post was written.
lastUpdated (Date) - Date that the post was last updated.

posts is a member of the Blog Posts dictionary.



posts has data type array

A collection of data values.

Metadata

Metadata are implicit properties belonging to a data type. If your data has the name 'foo', you reference it with 'data:foo'. If the metadata is 'bar', you can reference the value of foo's metadata bar with 'data:foo.bar'.

length: Provides the number of entries in the array.
size: Same as length.
last: The last item in the array.
first: The first item in the array.
empty: Whether the array has no items.
notEmpty: Whether the array has at least one items.
any: same as notEmpty.

Operators

The following operators apply to the array data type.
array contains item
Returns a boolean which is true if the given array contains the given item.
Example usage:
<b:if cond='[123, 456] contains data:post.id' /> [Special markup] </b:if>
array take number
(Also supported with the syntax limit)
Returns an array limited to number of the given array's items.
array skip number
(Also supported with the syntax offset)
Returns an array of the remaining items after skipping number of the given array's items.
lambda operators
Lambda operators are operators which apply a given function or condition to each item in an array.
They are applied using the syntax
array [lambda operation] (x => [function involving x])
Where:
  • x can be any variable name you like.
  • lambda operation is an operation from the list below.
  • function involving x is any expression involving x, where x is a variable representing an item in the array.
Lambda Operations
  • any: Returns a boolean for whether any item in the array returns true for the given function.
  • all: Returns a boolean for whether all the items in the array returns true for the given function.
  • none: Returns a boolean for whether none of the items in the array returns true for the given function.
  • count: Returns a number for the count of the items in the array that return true for the given function.
  • map: Returns an array of the results for applying the given function to each of the array items.
  • filter: Returns an array of the items which return true for the given function.