Download the PHP package superbig/craft3-templateselect without Composer
On this page you can find all versions of the php package superbig/craft3-templateselect. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download superbig/craft3-templateselect
More information about superbig/craft3-templateselect
Files in superbig/craft3-templateselect
Package craft3-templateselect
Short Description A fieldtype that allows you to select a template from a dropdown.
License MIT
Informations about the package craft3-templateselect
Template Select plugin for Craft CMS
A fieldtype that allows you to select a template from the site templates folder.
Requirements
This plugin requires Craft CMS 4.0 or later.
Installation
To install the plugin, follow these instructions.
-
Open your terminal and go to your Craft project:
cd /path/to/project
-
Then tell Composer to load the plugin:
composer require superbig/craft3-templateselect
- In the Control Panel, go to Settings → Plugins and click the “Install” button for Template Select.
Configuring Template Select
Create a new field and choose field type Template Select.
In the field settings, you can limit the list of available templates to a subfolder of the Craft templates folder. The path is relative, i.e. subfolder/anotherfolder. This may also be set to an ENV variable.
In the field settings, you can choose to make the template names more user friendly. In the field, the list will be improved by changing the following:
- file extensions will be removed
- the file names will be capitalized and spaced for readability
- folders will be separated by ›
Using Template Select
Output the chosen template name:
Include/Embed the chosen template:
Include the template including subfolder if set:
This is a alias for the following:
Output the subfolder name:
Output the filename without path:
Brought to you by Superbig