integer
The integer
type is one of the most basic ones in Lektor. It can store
arbitrary natural numbers both negative and positive. It should be used
instead of a string when a real number with such behavior is wanted as it
sorts numbers correctly and the numbers can be manipulated.
[fields.image_width]
label = Image width
type = integer
description = The intended image width in pixels.
addon_label = px
<img
src="{{ this.image.thumbnail(this.image_width - 10) }}"
alt="a thumbnail of that image"
style="border: 5px;">
Comments