Tutorials References Exercises Bootcamp Menu
Sign Up Create Website Get Certified Upgrade

Template Filter - linenumbers


Add the line number befor each line:

{{ mytext|linenumber }}
Run Example »

Definition and Usage

The linenumbers filter adds a the line numbers before each line of a text.


{{ value|linenumbers }}

Template filters are defined by using a pipe | character followed by the name of the filter.