Templates Module v1.1

Ryan Thompson Releases


The Templates module is a PRO addon that let's you manage custom views, stylesheets, scripts, and other templates from your control panel. You can then use these templates as regular prefixed views and assets or with the Template Block.


Repository: https://github.com/anomalylabs/templates-module

Documentation: https://pyrocms.com/documentation/templates-module


{% verbatim %}{{ asset_add("styles.css", "templates::group/*" }}

{% include "templates::group/template" %}{% endverbatim %}


{{ img('local://posts/templates-module-v1.1-edit.jpg')|raw }}


Route to Templates

You can also define routes to display specific templates. This makes it super easy to setup quick route/views for custom "pages", prototyping, or whatever you might need.


Installation

To get started simply require the addon with composer and assign it to your stream or include it in your block like you would any other field:

composer require anomaly/templates-module

php artisan addon:install anomaly.module.templates


Template Block

{{ img('local://posts/template_block-extension-v1.0.jpg')|raw }}


You can include the new template block as well by installing it in the same manner. This will let users choose a template to include using the "lookup" UI. The block will include view / display templates and display css, js, and other assets inline in their respective tags (after compiling coffee or scss if necessary for example).

composer require anomaly/template_block-extension

php artisan addon:install anomaly.extension.template_block

Enjoy!

- Ryan