Added limit function and example for limiting in template

Signed-off-by: Rogie King <hug@rog.ie>