Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TASK] Fuse function numrows into stdwrap #1499

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading