Renders a stored AA view and returns its HTML output. This is the main way to embed one slice listing inside another template, page, e-mail, or even inside another view.
The view supplies the layout and the default item set, sort and conditions (all configured in the View admin). At call time you may narrow the view to a specific set of items and override individual view settings.
vid accepts the numeric view ID or a named view alias. The ids parameter restricts output to the listed items (dash-separated long IDs, typically produced by ids). The settings parameter overrides stored view options as comma-separated name-value pairs, for example listlen-5 or sort-headline........
Note: when you pass ids, the view still applies its own sort - the items come back in the view sort order, not the order you listed them. Pass settings sort-AAnoSORT to keep the exact ids order. An empty or missing vid renders nothing.
This is the colon form handled by AA_Stringexpand_View. AA also accepts a legacy query-string form, view.php?vid=N, which additionally supports cmd-style per-view conditions; prefer the colon form in new templates.
vid optionalThe view to render: its number (e.g. 146) or its name - the Identifier set in the view (e.g. doc_stable). A name is unique only within a slice, so AA looks it up where the template runs: on a site page in the slices of the site; in the admin and in planned tasks in the current slice; inside a view loaded by view.php or jsview.php in the slice of that view; in slice.php templates in the displayed slice (since November 2026). A URL that loads view.php or jsview.php directly (lazy loading, AJAX refresh) has no such slice, so it needs the number. Write the keys of cmd[] and set[] the same way as vid: with vid=news_list use cmd[news_list], not the number of the view. The view holds the layout, default item set, sort and conditions. An empty or missing value renders nothing. A view set to work only inside pages (a setting of the view, of its slice or of a site using the slice, since November 2026) shows nothing when a URL asks view.php or jsview.php for it - it works only inside a template.
ids requiredRestricts the view to a specific set of items. A dash-separated list of item long IDs, typically produced by the ids command. When omitted, the view renders its own configured item set. Note: the view still applies its own sort to these items unless you also pass settings sort-AAnoSORT.
settings optionalOverrides stored view settings at render time. A comma-separated list of name-value pairs joined by a dash, for example listlen-3 or sort-headline........ or from-2,to-5. Recognized keys include listlen, from, to, page, random, sort (use AAnoSORT to disable sorting), group_by, group_limit and slices. To put a literal comma inside a value, double it as two commas.
{view:146}
{view:doc_stable}
{view:146:5726c2c6b035d7aab450d1794e9e90d7-aa89ddc95136b966e6ec1419a2963741-ce4ac95c48c3bbe590b80794e47c3e7b}
{view:146:{ids:9e1d2b9f88e3d6c3bf0eb967378610d6:d-abstract........-=-red}}
{view:146::listlen-2,sort-headline........}
{view:146::from-9,to-10}
{view:146:5726c2c6b035d7aab450d1794e9e90d7-ce4ac95c48c3bbe590b80794e47c3e7b-aa89ddc95136b966e6ec1419a2963741:sort-AAnoSORT}