COF - Content on First (page)

COF - Content on First (page)

by | 1.1 |

Content on First (page)

Show a document field, a chunk or a Tv only on first page of pagination

This snippet for Evolution CMS is designed to work with the pagination of the DocLister snippet, displaying a specific field, chunk, or TV only on the first page 

How it works

"COF" checks if the pagination parameter is present in the page URL (e.g., ?page=2). If the parameter is present, the field/chunk/TV will be hidden.

Of course, the main DocLister call should not be placed within the field that will be hidden by the snippet.

This snippet can be used in various scenarios, such as:

News/Articles List: Displaying a long introductory text before the DocLister news list, but only on the first page.

Featured News/Products: Showing a box with top news or highlighted products exclusively on the first page.

Snippet Parameters

Snippet Usage

Show a document field only on first page

[[Cof? &paginate=`page` &field=`content` &Message=`@TPL:GoBack`]]

Show a chunk only on first page

[[Cof? &paginate=`page` &chunk=`TopNews` &Message=`@TPL:GoBack`]]

Show a Template Vartiable only on first page

[[Cof? &paginate=`page` &Tv=`MyTv`]]

Show and Render a Template Vartiable only on first page

[[Cof? &paginate=`page` &Tv=`MyTv` &RenderTv=`1`]]