The layer= command allows assigning a name to a layer and later reference the same layer by name rather than layer number.
This allows a template to define named layers which can then be referenced from the request URL without the need to use variables.