get_value
Retrieves filtered values from an array
{{ get_value:[field] }}
Allows you to loop over filtered values in an array.
Sample Usage
{{ get_value:categories name="wilderness" from="/blog" }}
{{ description }}
{{ /get_content:categories }}
This will look in /blog
for a categories
array, and extract all the instances of name: wilderness
.
Assuming your categories
array looks like this:
categories:
-
name: wilderness
description: "The place where Statamic was born."
-
name: survival
description: "Tips on how to survive."
The above code would output: The place where Statamic was born.