Skip to content

pbResources

Snippet for resource output

Parameters

ParameterDefaultDescription
parentsCurrent resourceList of parents, separated by commas, to search for results.
resourcesList of resources, separated by commas, to display in the results.
tablesA list of tables, separated by commas, to join them to the result.
primary_idID of the primary record
limit10Number of records displayed. 0 - means without limits.
offset0Skipping values from the start
sortbymenuindexSort field
sortdirASCSort order
tplChunk to output results
toPlaceholderName of the placeholder where the data will be displayed
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
{'!pbResources'|snippet: [
    'parents' => 0,
    'resources' => '1,2,3',        // Display only specific resources
    'tables' => 'seo_list as list' // Join the `seo_list` table and replace the name with `list`.
    'tpl' => 'pb-seo-card', 
]}

© PageBlocks 2019-present