Optional use of a function for viewOptions