I need some help. Really struggle understanding how to build relationships between channels/entries.
Context/Want: I have two separate channels: 1. "Plant catalogue" 2. "Plant care" I want to re-use the entries from "Plant catalogue" across the whole website wherever I need it accesing speicifc fields.
What I have: "Plant care" has an entries field type to help build the relationship with "Plant catalogue": field name: "plantEntity" "Plant catalogue" has an asset field that include a photo of the plant. fiel name: "plantPhoto"
My code so far:
{% set plantcareListing = craft.entries().section('plantCare').limit(null)%}
{% set entries = plantcareListing.all() %}
{% for entry in entries %}
{% for image in entry.plantEntity %} {# how do I access the asset field "plantPhoto" here? :( #}
<img src="{{ image.getUrl() }}" alt="{{ image.title }}">
{% endfor %}
{{ entry.title }}
{% endfor %}
I would appreciate your advice. Thank you!