Download the PHP package goldnead/statamic-collapse-fieldtype without Composer
On this page you can find all versions of the php package goldnead/statamic-collapse-fieldtype. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download goldnead/statamic-collapse-fieldtype
More information about goldnead/statamic-collapse-fieldtype
Files in goldnead/statamic-collapse-fieldtype
Package statamic-collapse-fieldtype
Short Description A Collapse-Fieldtype for Statamic to beautifully hide and show your fields.
License MIT
Informations about the package statamic-collapse-fieldtype
statamic-collapse-fieldtype
A Collapse-Fieldtype for Statamic to beautifully hide and show your fields.
[!IMPORTANT] This addon is no longer maintained. Statamic now ships this feature in core: the Group fieldtype has
collapsibleandcollapsedoptions, and blueprint sections can be collapsible too. Please use those instead. There will be no Statamic 6 release of this addon.Thanks to everyone who used it and to the contributors who kept it alive for Statamic 4 and 5.
Migrating to the core Group fieldtype
Group stores its values the same way this addon did: nested under the field handle. In most cases you only change the field type in your blueprints and fieldsets:
Your saved content and templates ({{ collapse:section_width }}) keep working unchanged. Afterwards remove the addon:
Tested against Statamic 6.35. If you nest Grid or Replicator fields inside, check those entries once in the Control Panel.
Simple as that. Just tuck all the fields that take up too much space or you don't want to confuse your clients with et voilá: A beautiful little collapse-content section wherever you want that hides bloated fields.
Installation
That's it. No vendors-assets needing attention or config files waiting to be configured. Just a plain ol' Fieldtype, nuthin' more.
Usage
Behind the scenes this fieldtype kind of works like a grid or replicator fieldtype. Just without the repetition. Even conditions work!
Just use it in your fieldsets or blueprints like this:
Easy-peasy, right? You can also just use it in the blueprint editor.
Templating
Like in the grid fieldset all values are scoped within that field. So to acces the variable section_width from the example above we need to write something like this in our templates:
TODOs
- Enthusiastically added dark mode support to be used with radnight. Need to figure out how to use dark-mode only when that kind of addon is being used. Otherwise it will be displayed in dark when everything else stays liht, yuck!