Ecom:ProductList.PagesX

 

Summary

The Ecom:ProductList.Pages loop lets you display various information about the paging for the product list.

The available paging loop and tags make it possible to do things like this:

Remarks

There is also a number of range loops available. The range loop contains a fixed number of items depending on a range size. The start item and end item of the range is automatically calculated depending on a current page. The range loop has a different loop prefix: instead of using “Ecom:ProductList.Pages.” it uses “Ecom:ProductList.PagesX” where “X” refers to the range size. Here are ranges that are supported:

3 items (loop prefix is “Ecom:ProductList.Pages3.”).
5 items (loop prefix is “Ecom:ProductList.Pages5.”).
7 items (loop prefix is “Ecom:ProductList.Pages7.”).
9 items (loop prefix is “Ecom:ProductList.Pages9.”).
11 items (loop prefix is “Ecom:ProductList.Pages11.”).

Paging tags are also available in the page template. In this case they all have a prefix “Page:Ecom.ProductList.” instead of “Ecom:ProductList.

Examples

Basic usage

Notice the use of @item.GetValue to get data from the loop variable.
If you just write @GetValue, the data will be taken from outside the loop. Similarly, you have to use @item.GetLoop to use loops inside a loop.

<table> <tr> @foreach (LoopItem item in GetLoop("Ecom:ProductList.PagesX") { <td> @item.GetValue("Relevant.Tag") </td> } </tr> </table>

Check if the loop exists

@if (Loops.Contains("Ecom:ProductList.PagesX")) { ... }

Example of usage
The following general example illustrates how to use a loop construct.

<table> <!--@LoopStart(Ecom:ProductList.PagesX)--> <tr> <td><!--@Loop:Tag--></td> </tr> <!--LoopEnd(Ecom:ProductList.PagesX)--> </table>

Check if the loop exists

<!--@If LoopDefined(Ecom:ProductList.PagesX)--> ... <!--@EndIf(Ecom:ProductList.PagesX)-->

Available tags