getUrlParam

This is a user-contributed Extra. If you find issues or would like more info or help, please contact the author.

A simple snippet that will return a value passed through a URL parameter. The Parameter is sanitized and kept below a set size.

Revolution makes it easy to pass URL parameters. This snippet makes it simple to use that URL parameter.

OPTIONS

name - The parameter name, defaults to "p"
int - (Opt) Set as true to only allow integer values
max - (Opt) The maximum length of the returned value, defaults to 20
default - (Opt) The value returned if no URL parameter is found