tiny-pixel / acorn-block-templates
Block templates for Sage 10
Fund package maintenance!
Patreon
Installs: 1 202
Dependents: 0
Suggesters: 0
Security: 0
Stars: 19
Watchers: 4
Forks: 4
Open Issues: 2
Type:package
pkg:composer/tiny-pixel/acorn-block-templates
Requires
- php: >=7.2
This package is auto-updated.
Last update: 2025-10-15 18:40:11 UTC
README
Easily override block markup with Blade templates in Sage 10.
Requirements
Installation
Install via Composer:
$ composer require tiny-pixel/acorn-block-templates
Usage
Create a blocks directory in resources/views. Templates should be named after the block they target and should be placed within a directory with a name matching the block's namespace.
Example
├── blocks └── core ├── gallery.blade.php # core/gallery ├── image.blade.php # core/image └── paragraph.blade.php # core/paragraph
The template is passed two variables: $attr and $content.
$attris an array of the block's attributes.$contentis a string of the block's output.
In this way you can override the template for any block, regardless of if it is registered by core or a plugin. You can use Composers, extends, or any other feature afforded to you by Sage, Illuminate or other packages.
Contributing
Contributing, whether it be through PRs, reporting an issue, or suggesting an idea is encouraged and appreciated.
All contributors absolutely must strictly adhere to our Code of Conduct.
License
This project is provided under the MIT License.