G

getUrlParam

By Paul Merchant (paulmerchant)


getUrlParam

 

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 (i.e. blog/2012/08/02/remarkable-results-no-coding-required/?p=yes). 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

 

Example:

 

Paul Merchant


New in getUrlParam 1.0-beta1

There are no release notes for this version.

More

Information

Released
October 29, 2010
Supported Versions
2 – Current
Downloads
6,578
License
MIT

More from Paul Merchant

G
getResourceField

A snippet to return a field or a TV value from a specified resource.…

View