Skip to content
BannerY
BannerY
Component for managing site banners. Create banners and ad positions, link them, and output them where needed. Click statistics are tracked.
  1. Extras
  2. BannerY

BannerY

Component for managing site banners.

Create banners and ad positions, link them, and output them where needed. The Manager tracks click statistics.

Parameters

NameDescription
&positionsComma-separated list of ad position IDs to show banners from.
&showLogShow extra snippet debug info. Only for users logged in to the "mgr" context.
&fastModeFast chunk processing. All unprocessed tags (conditions, snippets, etc.) are stripped.
&limitMaximum number of results.
&offsetNumber of results to skip.
&sortbySort field. You can use "RAND()".
&sortdirSort direction.
&outputSeparatorOptional string to separate results.
&whereJSON-encoded array of extra query conditions.
&showInactiveInclude disabled positions.
&tplChunk name for each banner. If empty, banner fields are printed as-is.
&tplFirstChunk for the first banner.
&tplLastChunk for the last banner.
&tplOddChunk for every second banner.
&tplWrapperWrapper chunk for all results. Accepts [[+output]]. Does not work with &toSeparatePlaceholders.
&wrapIfEmptyOutput the &tplWrapper chunk even when there are no results.
&toPlaceholderIf set, the snippet stores all data in a placeholder with this name instead of outputting.
&toSeparatePlaceholdersIf you set a prefix here, each result is put in a placeholder named prefix + row index (from 0). E.g. "myPl" gives [[+myPl0]], [[+myPl1]], etc.

Examples

Create a banner and a position first. See the Interface section.

To show banners in random order (default), call the snippet uncached:

modx
[[!BannerY? &positions=`2`]]