Skip to content

Commit

Permalink
[TASK] Fuse function numrows into stdwrap
Browse files Browse the repository at this point in the history
It cannot be used in any other place so it is just a stdwrap function
  • Loading branch information
linawolf committed Dec 27, 2024
1 parent 43c3e24 commit 3f3753b
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 69 deletions.
69 changes: 0 additions & 69 deletions Documentation/Functions/Numrows.rst

This file was deleted.

39 changes: 39 additions & 0 deletions Documentation/Functions/Stdwrap.rst
Original file line number Diff line number Diff line change
Expand Up @@ -194,13 +194,52 @@ Properties for getting data


.. _stdwrap-numRows:
.. _numrows:

.. confval:: numRows
:name: stdwrap-numRows
:type: :ref:`->numRows <numrows>` / :ref:`stdWrap`

Returns the number of rows resulting from the supplied :sql:`SELECT` query.

.. _numRows-examples:

.. rubric:: Example

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

.. code-block:: typoscript
:caption: EXT:site_package/Configuration/TypoScript/setup.typoscript
10 = FLUIDTEMPLATE
10 {
variables {
numberOfContentElementsInColPosOne = TEXT
numberOfContentElementsInColPosOne.stdWrap.numRows {
table = tt_content
select.where = {#colPos}=1
}
}
}
.. _numRows-properties:
.. _numrows-table:

.. confval:: numRows.table
:name: _numrows-table
:type: Table name

Name of the database table to query.

.. _numrows-select:

.. confval:: numRows.select
:name: numrows-select
:type: :ref:`select`

Select query for the operation.


.. _stdwrap-preUserFunc:

Expand Down

0 comments on commit 3f3753b

Please sign in to comment.