NovaeZStaticTemplatesBundle

UNIX name Owner Status
NovaeZStaticTemplatesBundle eZ Ecosystem stable
Version Compatible with
N/A N/A
Access Twig template thanks to an auto-injected SiteAccess to simplify Front-End Development

Novactive eZ Static Templates bundle

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

It use the siteaccess and the 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 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 Resources\views\themes\static_test\news\details.html.twig

Requirements

  • eZ Platform 2+
  • PHP 7.1+

Installation

Get the bundle

Run composer require novactive/ezstatictemplatesbundle to install the bundle and its dependencies.

Register the bundle

Activate the bundle in app\AppKernel.php file.

// app\AppKernel.php

public function registerBundles()
{
...
$bundles = array(
new FrameworkBundle(),
...
new Novactive\Bundle\EzStaticTemplatesBundle\EzStaticTemplatesBundle(),
);
...
}

Configuration

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

No news yet.

This project has no reviews yet. Be the first one to review it!

No forum messages yet.