Table Join connects records between different tables, allowing you to reference and display data from related tables.
Steps #
1. Identify the Tables to Join #
Determine the primary and secondary tables you want to join. The primary table is where you’ll add the Table Join field, and the secondary table contains the related information.
2. Add a Table Join Field #
In your primary table, add a new field and select the “Table Join” type to create a relationship between the tables.
3. Configure the Table Join Field #
Configure the field with the following options:
- Table: Choose the secondary table.
- Field: Choose the corresponding field in the secondary table.
4. Implement the Join #
The extension will generate the necessary SQL queries to perform the LEFT JOIN operation based on your configurations.
6. Viewing the Results #
The joined data can be accessed in your Joomla site’s frontend. Custom Tables utilizes Twig templating for data rendering. You can use Twig tags to display the values from the joined tables. For example, if you have a field from the secondary table you wish to display, you can use the following Twig tag:
{{ record.getvalue("FieldNameFromSecondaryTable") }}
Replace FieldNameFromSecondaryTable with the actual field name you want to retrieve the value from.
Leave a Reply
You must be logged in to post a comment.