towardstudio / sectionfield
Creates a section selector field in the CMS
Installs: 73
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:craft-plugin
Requires
- craftcms/cms: ^5
This package is auto-updated.
Last update: 2024-10-30 14:52:11 UTC
README
Creates a section selector field in the CMS
Requirements
This plugin requires Craft CMS 5 or later. For Craft 4 please use version 2.0.0
Installation
To install the plugin, follow these instructions.
- Open your terminal and go to your Craft project:
cd /path/to/project/craft
- Then tell Composer to load the plugin:
composer require towardstudio/sectionfield
- In the Control Panel, go to Settings → Plugins and click the “Install” button for Section Field.
Usage
Sections
{% set sections = craft.sectionField.sections(entry.myFieldHandle) %}
{% for section in sections %}
{{ section.name }}
{% endfor %}
Entries from the selected section/s
{% set entries = craft.sectionField.entries(entry.myFieldHandle) %}
{% for entry in entries.all() %}
{{ entry.title }}
{% endfor %}
Brought to you by Toward