Previous

Use the previous helper to select the previous item in a list; you must pass an array as the first argument and the current item as the second argument. It is an error if the current item does not exist in the list.

Arguments

Example

If there is no previous item available the block is not rendered.

{{#previous list item}}
{{! This block is set to the scope of the previous item in the list }}
{{/previous}}

See the previous page partial which uses this helper to create a link to the previous item in a menu.

warn

You should only use this helper with lists that do not contain duplicate values.

Back to Helpers