Iterates over a Vae Collection and renders the text and tags inside once for every entry. This tag is very flexible: you can paginate, search, and sort the collection directly in this tag.
You may nest a
<v:divider> tag inside this tag to
specify a divider that is shown after each entry or after a certain
number of entries. Dividers can also wrap the entry content.
path- path to the collection you would like to render. Uses VaeQL syntax.
all- if using pagination, you can set this to the ID of a
<v:a>element that will be used as a link that will show all entries on one page, bypassing the pagination.
default_page- applies if you are using pagination on this collection. If set to a number, that page number will be the default page shown. If set to
last(), the last page will be the default page shown.
filter- specify text representing a search query. Only entries matching the search query will be returned.
filter_input- specify the name of a GET or POST parameter containing a search query. Only entries matching the search query will be returned.
groups- If you want display to different parts of the same collection on a page (for example half in a left column and half in a right column), set this attribute to the number of places you are putting the collection. See the samples below for more information.
max_pages- If using pagination, and this attribute is set to a number, no more than this many pages will be generated.
next- if using pagination, this is the ID of a
<v:a>element that will be used as the link to navigate to the next page.
order- If set to the the name of a structure in this collection, the collection will be sorted by that structure. You may also sort by multiple structures by separating them with a comma. You may sort by a structure in descending order by wrapping the structure name with
DESC(), such as
DESC(name). You may sort by the number of entries in a child collection by wrapping the child collection name with
COUNT(), such as
COUNT(comments). You can reverse the order stored in Vae by setting this attribute to
DESC(). You can display elements in a random order by setting this attribute to
output_order- If set to
reverse, the elements in your collection will be rendered in reverse order. Note that if you are using pagination, this will only render the items on the current page in reverse. No other pages will be affected. Items will be on the same page that they would have been without this attribute set.
page_select- if using
pagination, this is the ID of a
<v:select>element that will be used as the link to navigate to other pages. This element must come after the collection in the page. You only need to specify an
idattribute in the
paginate- show no more than this many items per page.
per_row- this attribute allows
<v:collection>to easily build a table by filling rows across. Set this attribute to the number of columns that should be in the table.
<tr>tags will be generated automatically, but the contents of this tag should begin and end with a
</td>tag. Please see the example literal.
previous- if using pagination, this is the ID of a
<v:a>element that will be used as the link to navigate to the previous page. This element must come after the collection in the page. You only need to specify an
idattribute in the
skip- if set to a number, that many items will be skipped before listing any contents.
store_in_session- If set, a comma-delimited list of the permalinks of all items that match this path and filter, in the sorted order, will be stored in the session under this name. Useful in combination with
unique- If set to the the name of a structure in this collection, only unique values of that entry will be returned. You may require a unique combination of values in multiple structures by listing each structure separated by a comma.
wrap- if set to
trueand using pagination, the Next link on the last page will link to the first page and the Previous page on the first page will link to the last page. In other words, it wraps around.
Sample using the
Sample using the
Sample search results page:
Sample with sorting:
Samples with pagination: