pbResources
Snippet for resource output
Parameters
Parameter | Default | Description |
---|---|---|
parents | Current resource | List of parents, separated by commas, to search for results. |
resources | List of resources, separated by commas, to display in the results. | |
tables | A list of tables, separated by commas, to join them to the result. | |
primary_id | ID of the primary record | |
limit | 10 | Number of records displayed. 0 - means without limits. |
offset | 0 | Skipping values from the start |
sortby | menuindex | Sort field |
sortdir | ASC | Sort order |
tpl | Chunk to output results | |
toPlaceholder | Name of the placeholder where the data will be displayed | |
fileElements | 0 | Use file chunks |
outputSeparator | \n | Output format of values. Possible values: data, json |
where | [] | Array of additional parameters for filtering results. |
return | chunk | Output 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',
]}