Skip to content

Commit

Permalink
Explain how to fetch the current tt_content UID
Browse files Browse the repository at this point in the history
  • Loading branch information
cweiske committed Jan 25, 2024
1 parent 3500aaa commit 107cf54
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Documentation/ApiOverview/Fal/UsingFal/ExamplesFileFolder.rst
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,11 @@ table:
where :php:`$uid` is the ID of some page. The return value is an array
of :php:`\TYPO3\CMS\Core\Resource\FileReference` objects.

.. seealso::

See :ref:`typo3-request-attribute-current-content-object` about fetching
the UID of the current `tt_content` object.


.. _fal-using-fal-examples-file-folder-list-files:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ Example:
* @var \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer $currentContentObject
*/
$currentContentObject = $request->getAttribute('currentContentObject');
$curTtContentUid = $currentContentObject->data['uid'];

0 comments on commit 107cf54

Please sign in to comment.