samhernandez / craft-shortcodes
A Craft CMS plugin for creating reusable shortcodes that map to Twig templates.
Package info
Type:craft-plugin
pkg:composer/samhernandez/craft-shortcodes
Fund package maintenance!
Requires
- php: ^8.2
- craftcms/cms: ^5.0.0
- thunderer/shortcode: ^0.7.4
- verbb/base: ^3.0.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-11-13 04:08:16 UTC
README
Shortcodes for Craft CMS
Shortcodes is a Craft CMS plugin that lets content carry small, reusable instructions that Twig turns into project-owned output. Give authors concise tokens for components or dynamic values without allowing arbitrary template code in the field.
Register a shortcode name and handler, then let authors place that token within supported text. Attributes carry the few values the component needs while the rendering logic remains in project code.
Features
- Represent a reusable component with a concise shortcode token.
- Pass controlled options without exposing Twig expressions to authors.
- Define what each shortcode means in module or template code.
- Update presentation centrally while stored content stays concise.
- Process shortcodes inside the content formats selected by the project.
- Use a shortcode within surrounding text or as a block-level component.
Documentation
Visit the Shortcodes Plugin page for all documentation, guides, pricing and developer resources.
Credit & Thanks
Originally created by Sam Hernandez.
Support
Get in touch with us via the Shortcodes Support page or by creating a GitHub issue.
Sponsor
Shortcodes is licensed under the MIT license, so it will always be free and open source. If you'd like to support it anyway, you can sponsor its development.