bluegg/sectionfield

This package is abandoned and no longer maintained. The author suggests using the towardstudio/sectionfield package instead.

Creates a section selector field in the CMS

3.0.0 2024-07-30 14:22 UTC

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.

  1. Open your terminal and go to your Craft project:
cd /path/to/project/craft
  1. Then tell Composer to load the plugin:
composer require towardstudio/sectionfield
  1. 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 %}

Toward Disclaimer

Brought to you by Toward