Description
Returns an array of all the files (including text blocks) from the selected project. Can be used both templates and layouts.
Example output:
array( '23' => array( 'id' => 23, 'title' => 'Shadowplay', 'caption' => 'The dance of shadows as the sun crawls out from beneath the darkness.', 'file' => 'shadowplay.jpg', 'thumbnail' => 'shadowplay.thumb.jpg', 'width' => '600', 'height' => '800', 'project_id' => 3, 'pos' => 1 'type' => 'image', 'filegroup' => 2 ) )
Usage
<?php $files= getProjectFiles( $id ); ?>
Parameters
$id
- integer or string
- optional
The ID number or slug of the project to retrieve. Defaults to the current project if empty.
Examples
<?php $files= getProjectFiles( $id ); foreach ( $files as $id => $data ) { echo $data['title']; } ?>