numRows

This object allows you to specify a SELECT query, which will be executed in the database. The object then returns the number of rows, which were returned by the query.

Properties

table

table

table
Type
Table name

Name of the database table to query.

select

select

select
Type
select

Select query for the operation.

The sub-property selectFields is overridden internally with count(*).

Example

Get the number of content elements within certain colPos of the current page.

EXT:site_package/Configuration/TypoScript/setup.typoscript
10 = FLUIDTEMPLATE
10 {
    variables {
        numberOfContentElementsInColPosOne = TEXT
        numberOfContentElementsInColPosOne.numRows {
            table = tt_content
            select.where = {#colPos}=1
        }
    }
}
Copied!