[TYPO3-dev] read elements from sysFolder

Jigal van Hemert jigal.van.hemert at typo3.org
Thu Nov 26 22:31:04 CET 2015


Hi,

On 25/11/2015 20:48, typo3dev wrote:
> i guess that i don't use correct names maybe this link will help
>
> goo.gl/Jsf6le

This helps a lot! (They say a picture is worth a thousand words :-) )

There are two parts in the problem:

1. Get content elements from a page/folder

Not exactly like the frontend, but at least you can take deleted and 
hidden records and time restrictions into account:

$contentElements =
   \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordsByField(
     'tt_content',
     'pid',
     $pid,
     '1=1' . \TYPO3\CMS\Backend\Utility\BackendUtility::BEenableFields(
         'tt_content'
       )
   );

Now you have the records of the content elements in the page/folder with 
id $pid. For each element you have to get the linked files.

2. Get the linked files
For this the wiki you visited earlier has an example:

https://wiki.typo3.org/File_Abstraction_Layer#Get_linked_images_from_a_content_element

-- 
Jigal van Hemert
TYPO3 CMS Active Contributor

TYPO3 .... inspiring people to share!
Get involved: typo3.org



More information about the TYPO3-dev mailing list