Skip to content
Zotonic
  • Start
  • Cookbook
  • Reference
  • Releases

Live search

Search across all Zotonic content

Type at least two characters

Results are matched against titles, summaries and topics as you type.

Filters · mod_base
  • Reference
  • Frontend developer
  • Template filter
  • Create
  • Number
  • Collection

range

Module

mod_base

Generate a list of integers, with an optional step.

For example:

{{ 1|range:4 }}

Generates the list [1,2,3,4].

The second filter argument is the step size:

{{ 1|range:10:2 }}

Generates the list [1,3,5,7,9].

Edit on GitHub

Related documentation

Filters

sum

Sum a list of numbers.

Filters

rand

Generates a random number. The number is from, and including, 1 up to, and including, the input value.

Filters

extract

Extract a specific property from each item in a list.

Filters

floor

Round down a floating point value.

Filters

filter_by

Filter a list of items based on a property value and optional predicate.

Filters

language_sort_localized

Sort a list of language codes or map with languages on their localized name in the currently selected language. This is useful for…

Filters

menu_ids

Returns all resource ids in a menu. Could return invisible and non existing resource ids. The returned ids are a flat list, the hierarchy…

Filters

group_firstchar

Group a list of sorted model#rsc resource IDs on their first letter of the title or another resource property. After grouping, it splits…

Filters

index_of

Returns the index of the first occurrence of the item in the given list.

GitHub © 2026 Zotonic