Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/novactive/novaezstatictemplatesbundle

Access Twig template thanks to an auto-injected SiteAccess to simplify Front-End Development
https://github.com/novactive/novaezstatictemplatesbundle

ezplatform siteaccess theme twig

Last synced: 2 months ago
JSON representation

Access Twig template thanks to an auto-injected SiteAccess to simplify Front-End Development

Awesome Lists containing this project

README

        

# Novactive eZ Static Templates bundle

----

This repository is what we call a "subtree split": a read-only copy of one directory of the main repository.
It is used by Composer to allow developers to depend on specific bundles.

If you want to report or contribute, you should instead open your issue on the main repository: https://github.com/Novactive/Nova-eZPlatform-Bundles

Documentation is available in this repository via `.md` files but also packaged here: https://novactive.github.io/Nova-eZPlatform-Bundles/master/StaticTemplatesBundle/README.md.html

----

[![Downloads](https://img.shields.io/packagist/dt/novactive/ezstatictemplatesbundle.svg?style=flat-square)](https://packagist.org/packages/novactive/ezstatictemplatesbundle)
[![Latest version](https://img.shields.io/github/release/Novactive/NovaeZStaticTemplatesBundle.svg?style=flat-square)](https://github.com/Novactive/NovaeZStaticTemplatesBundle/releases)
[![License](https://img.shields.io/packagist/l/novactive/ezseobundle.svg?style=flat-square)](LICENSE)

Novactive eZ Static Templates bundle is an eZ Platform bundle providing an ultra easy way to access twig templates from an url.

It uses the [siteaccess](https://doc.ezplatform.com/en/latest/guide/siteaccess/) and the [design engine](https://doc.ezplatform.com/en/latest/guide/design_engine/) provided by eZ Platform.

## Features

When you access a siteaccess in the siteaccess group `static_group`, it will take the url and show the twig template having the corresponding path.

You can configure as many siteaccess as you want, and using the design engine you can configure a different theme for each siteaccess.

As we are using the siteaccess feature, u can also use the [permissions](https://doc.ezplatform.com/en/latest/guide/permissions/) to control the access.

### Example

Considering a theme `static_test`, a siteaccess `static-test` is automatically generated. The siteaccess is then matched by URI, the url `http://localhost/static-test/news/details` will show the template in `themes\static_test\news\details.html.twig`

That's it!

## Installation

### Get the bundle

Add the lib to your composer.json, run `composer require novactive/ezstatictemplatesbundle` to refresh dependencies.

Then inject the bundle in the `bundles.php` of your application.

```php
Novactive\Bundle\EzStaticTemplatesBundle\EzStaticTemplatesBundle::class => [ 'all'=> true ],
```

### Configuration

None!

The siteaccess configuration is autogenerated based on existing themes whose name start with "static_"