{"id":16798905,"url":"https://github.com/sjelfull/craft3-templateselect","last_synced_at":"2026-02-16T23:12:59.512Z","repository":{"id":26400630,"uuid":"108695058","full_name":"sjelfull/craft3-templateselect","owner":"sjelfull","description":"A fieldtype that allows you to select a template from the site templates folder.","archived":false,"fork":false,"pushed_at":"2024-05-13T21:39:52.000Z","size":1191,"stargazers_count":17,"open_issues_count":4,"forks_count":9,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-05T01:31:05.646Z","etag":null,"topics":["craft-plugin","craft3","craftcms","craftcms-plugin","fieldtype"],"latest_commit_sha":null,"homepage":"https://superbig.co","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sjelfull.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-29T00:56:13.000Z","updated_at":"2024-10-15T15:06:02.000Z","dependencies_parsed_at":"2024-05-12T20:44:29.719Z","dependency_job_id":"1fa548a1-e193-4375-9261-c0e2b7c4f62a","html_url":"https://github.com/sjelfull/craft3-templateselect","commit_stats":{"total_commits":18,"total_committers":5,"mean_commits":3.6,"dds":0.2777777777777778,"last_synced_commit":"406c32dbcd225be3daa053658606817a42298b39"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/sjelfull/craft3-templateselect","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjelfull%2Fcraft3-templateselect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjelfull%2Fcraft3-templateselect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjelfull%2Fcraft3-templateselect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjelfull%2Fcraft3-templateselect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sjelfull","download_url":"https://codeload.github.com/sjelfull/craft3-templateselect/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sjelfull%2Fcraft3-templateselect/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263991505,"owners_count":23540667,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["craft-plugin","craft3","craftcms","craftcms-plugin","fieldtype"],"created_at":"2024-10-13T09:27:15.224Z","updated_at":"2026-02-16T23:12:59.504Z","avatar_url":"https://github.com/sjelfull.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Template Select plugin for Craft CMS\n\nA fieldtype that allows you to select a template from the site templates folder.\n\n![Screenshot](resources/img/field-with-friendly.png)\n\n## Requirements\n\nThis plugin requires Craft CMS 4.0 or later.\n\n## Installation\n\nTo install the plugin, follow these instructions.\n\n1. Open your terminal and go to your Craft project:\n\n        cd /path/to/project\n\n2. Then tell Composer to load the plugin:\n\n        composer require superbig/craft3-templateselect\n\n3. In the Control Panel, go to Settings → Plugins and click the “Install” button for Template Select.\n\n## Configuring template select\n\nCreate a new field and choose field type Template Select.\n\nIn 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.\n\n![Screenshot](resources/img/field-settings.png)\n\n![Screenshot](resources/img/field-without-friendly.png)\n\nIn 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:\n- file extensions will be removed\n- the file names will be capitalized and spaced for readability\n- folders will be separated by ›\n\n![Screenshot](resources/img/field-with-friendly.png)\n\n## Adding descriptions to templates\n\nYou can add descriptions to your templates to help users understand what each template does. This is especially useful when you have many templates to choose from.\n\nTo add a description to a template, add a special comment at the beginning of your template file:\n\n```twig\n{# @description: Displays a paginated list of blog posts with thumbnails and excerpts #}\n```\n\nThe description will appear in the dropdown next to the template name, making it easier for content editors to select the right template.\n\n**Examples:**\n\n```twig\n{# @description: Contact form with validation and CAPTCHA support #}\n\u003cform method=\"post\"\u003e\n    ...\n\u003c/form\u003e\n```\n\n```twig\n{# @description: Hero section with background image and call-to-action button #}\n\u003csection class=\"hero\"\u003e\n    ...\n\u003c/section\u003e\n```\n\nDescriptions can also span multiple lines:\n\n```twig\n{# @description: Complex product grid layout\n   Includes filters, sorting, and pagination\n   Supports up to 4 columns #}\n```\n\n**Note:** Templates without descriptions will still work normally and appear in the dropdown without any description text.\n\n## Using template select\n\n### Output the chosen template name:\n\n```twig\n{{ entry.fieldHandle }}\n```\n\n### Include/Embed the chosen template:\n\n```twig\n{% include entry.fieldHandle %}\n```\n\n### Include the template including subfolder if set:\n\n```twig\n{% include entry.fieldHandle.withSubfolder() %}\n```\n\nThis is a alias for the following:\n\n```twig\n{{ entry.templateWithSubfolder.template(true) }}\n```\n\n### Output the subfolder name:\n\n```twig\n{{ entry.fieldHandle.subfolder() }}\n```\n\n### Output the filename without path:\n\n```twig\n{{ entry.fieldHandle.filename() }}\n```\n\nBrought to you by [Superbig](https://superbig.co)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsjelfull%2Fcraft3-templateselect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsjelfull%2Fcraft3-templateselect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsjelfull%2Fcraft3-templateselect/lists"}