Relationship Field (PRO)
This field allows you to establish relationships between PageBlocks tables or resources (pbResources). It provides flexibility and convenience in managing related data.
Available relationship types:
- One to One — One-to-one
- One to Many — One-to-many
- Many to One — Many-to-one
- Many to Many — Many-to-many
Example of output using the pbRelationship snippet:
php
[[!pbRelationship?
&relation_type=`one_to_one` // Type of relationship
&primary_table=`pbTable` // Primary table: pbTable or pbResources
&primary_id=`1` // ID of the primary record
&tpl=`relation` // Chunk for rendering results.
]]