Skip to content

pbFiles

Snippet for file output

Parameters

ParameterDefaultDescription
field_nameField name
modelTypemodDocumentDocument model
classKeypbFileTable class
context_keycurrent resourceBy default, the current resource context is used.
resource_idcurrent resourceBy default, the ID of the current resource is used.
tplChunk for files.
sortbymenuindexSort field
sortdirASCSort order
limit20Number of records displayed. 0 - means without limits.
offset0Skipping values from the start
fileElements0Use file chunks
outputSeparator\nOutput format of values. Possible values: data, json
where[]Array of additional parameters for filtering results.
returnchunkOutput format of values. Possible values: chunk, data or array, json

Examples

php
{'!pbFiles'|snippet: [
    'field_name' => 'fieldname',
    'tpl' => 'name_chunk'
]}

© PageBlocks 2019-present