Using Prefixes with Lists
If you have more than one list of items within in a Web page (as List components), you can use a unique prefix to control which actions are performed on which lists.
The prefix is used with the Filter Criteria and Pagination Control components. You assign a unique prefix to the controlling component (Filter Criteria, Pagination, or both), and then assign the same prefix to the list or lists you want them to control, so that:
- The filter criteria drop-down menu only displays for lists with the matching prefix.
- Pagination is used only for lists with the matching prefix.
By default, if no prefix is specified, applying either of these components to a Web page affects all lists within (or associated with) the page. For instance, the page body may contain one List component while the single display template for the page contains another. If the page body also contains a Pagination Control component, the pagination is applied to the list in the page body and the list in the display template.
Assigning a prefix requires two steps, in any order:
- Assign a prefix to a List component
- Assign a prefix to a Filter Criteria or Pagination Control component
A prefix applied to a List component can be used in both the Filter Criteria and Pagination Control components. This can be helpful when tracking your prefix usage.
Once you assign a prefix to components and create a prefix relationship, you create a parallel relationship among components without prefixes associated with the same page. A component without a prefix will only affect lists also without a prefix; it will not affect lists that have any prefix at all.
Example:
A Web page contains three List components and a Pagination Control component. The page is also targeted by a Filter Criteria component on another page. No prefixes are in use, so all three lists display both a pagination control and a filter criteria drop-down menu. You assign a unique prefix to the Filter Criteria component and to one List component. From then on, the Filter Criteria component applies only to the list with that prefix, while the Pagination Control component applies only to the lists without prefixes, and not to the "prefixed" list.