pbRelationship
Snippet for relationship output
Parameters
Parameter | Default | Description |
---|---|---|
relation_type | one_to_one | Type of relationship. Possible values: one_to_one, one_to_many, many_to_one, many_to_many |
primary_table | pbTable | Primary table. Possible values: pbTable, pbResources |
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 for blocks. By default, it is used from the block itself. | |
return | chunk | Output format of values. Possible values: chunk, data or array, json |
toPlaceholder | Name of the placeholder where the data will be displayed |
Examples
php
{'!pbRelationship' | snippet: [
'relation_type' => 'one_to_one',
'primary_table' => 'pbTable',
'primary_id' => 1,
'tpl' => 'relation',
]}