Working with a collection

Shortcode: aw2_collection

A collection is created whenever a query is fired eg aw2_query_posts or aw2_query_terms
To loop through a collection see Looping through a collection

Parameters

——————-


id: The id of the collection to access. Defaults to ‘default_collection’ . [aw2_loop] also defaults to ‘default_collection’


main: count – Returns the results of the count


main: options – Creates an option block for a select tag. option_value and option_display must also be specified. option_selected can also be specified to select


main: yes – Checks if there are more than zero records. if yes then executes inside


main: no – Checks if there are 0 records.if yes then executes inside


main: stringify – Will Implode a simple array. Use in aw2_query_terms to get an array of one field


set_param – Sets the returned value as a parameter

Example

—————-