nav33d / craft-relations
A field type to show reverse related elements
Installs: 7 182
Dependents: 0
Suggesters: 0
Security: 0
Stars: 8
Watchers: 3
Forks: 4
Type:craft-plugin
pkg:composer/nav33d/craft-relations
Requires
- craftcms/cms: ^3.0.0
README
A field type to show reverse related elements.
Requirements
This plugin requires Craft CMS 3.0.0 or later.
Installation
To install the plugin, follow these instructions.
- Open your terminal and go to your Craft project:
cd /path/to/project
- Then tell Composer to load the plugin:
composer require nav33d/craft-relations
- In the Control Panel, go to Settings → Plugins and click the “Install” button for Relations.
Screenshots
Accessing relations in template
You can access relations in template using your field handle. Lets say your field is called relations, you can use the following code block to access relations:
{% if entry.relations %}
{% for item in entry.relations %}
<h2>{{ item.title }}</h2>
{% endfor %}
{% endif %}
Credits
- Relations icon by Noun Project
Brought to you by Naveed Ziarab

