bluegg / sectionfield
Creates a section selector field in the CMS
Installs: 85
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-07-30 14:23:08 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