Level Entry Types



Level Entry Types Overview

This plugin allows you to specify available entry types to the user based on the current structure level of an entry.

For example, if you have a structure made up of landing pages and tabbed pages, you can ensure tabbed pages are only allowed as a descendant of a landing page.

This plugin will allow a user to select from a filtered list of entry types, or display an error message if a user has misconfigured a structure hierarchy.

Configuring Level Entry Types

There are no control panel settings for this plugin.

Level Entry Types supports the standard multi-environment friendly config plugin settings file. Just copy the level-entry-types.php file from the vendor/confluxgroup/craft-level-entry-types directory to your Craft config directory and configure the settings to your liking.

Example level-entry-types.php config file

<?php

return [
	'structures' => [
		// list your structure section handles		
		'sectionOneHandle' => [
			// add each level you want to limit
			1 => [
				// add each entry type that's allowed at this level
				'entryTypeHandle',
				'entryTypeTwoHandle
			],
			2 => [
				'entryTypeThreeHandle'
			]
		], // don't forget a comma if you're defining multiple structures
	]
];
  1. In the structures array, add the section handle(s) (must be a structure) whose entry types you want to manage.
  2. For each level of a structure, create an array of acceptable entry types. Each level can contain as many entry types as needed. If a level is left blank, or not defined at all, the native Craft behavior of allowing any entry type at that level will apply.
  3. In the Craft control panel, for each structure using this plugin, add a new “Entry Type” column to your element index view. This is required to display errors to the end user from the element index page.

This plugin does not alter Craft’s native behavior when it comes to saving entries. If somehow an entry is on a level it shouldn’t be, this plugin will provide an error UI and a flash alert indicating such. Functionally, we aren’t preventing or changing native Craft behavior.


$20

Price includes 1 year of updates.
$9/year per site for updates after that.


Package Name

To install this plugin, search for its package name on the Plugin Store and click “Install”.


Information

  • Version 1.0.4
  • Last Update 5/26/2020
  • Active Installs 37
  • Compatibility Craft 3
  • License Craft
  • Categories Control Panel, Utilities

Report an issue