Thanks @dannio , I got the following results;
For
{% if dynamic_page_route_level == 0 %}
{% elif dynamic_page_route_level == 1 %}
{% set rows = hubdb_table_rows (Table ID - for level 1) %}
{% for row in rows %}
{% if loop.index == 1 %}
{% for foreign_row in row.foreign_id %}
<h6>
{{ foreign_row.company_name }}
</h6>
{% endfor %}
{% endif %}
{% endfor %}
{% elif dynamic_page_route_level == 2 %}
{% endif %}
It used the ‘foreign_ID’s’ from ‘foreign_ID column’ in row 1 of ‘database 1’ to populate for child pages of each row in ‘database 1’.
When I tried the below
{% if dynamic_page_route_level == 0 %}
{% elif dynamic_page_route_level == 1 %}
{% set rows = hubdb_table_rows (Table ID - for level 1) %}
{% for row in rows %}
{% for foreign_row in row.foreign_id %}
{% if loop.index == 1 %}
<h6>
{{ foreign_row.company_name }}
</h6>
{% endif %}
{% endfor %}
{% endfor %}
{% elif dynamic_page_route_level == 2 %}
{% endif %}
It used the first ‘foreign_id’ from ‘foreign_ID column’ from each row in ‘database 1’ and populated them across the child pages of each row.
Either way I can’t seem to get it to only pull the ‘foreign_ID’s’ from the ‘foreign_ID column’ from the row in database 1 that related to that child page.