Skip to content

towardstudio/sectionfield

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Section Field plugin for Craft CMS 4.x

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

About

Creates a section selector field in Craft CMS

Resources

License

Stars

Watchers

Forks

Packages

No packages published