PHPackages                             volta-framework/component-template - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. volta-framework/component-template

ActiveLibrary[Templating &amp; Views](/categories/templating)

volta-framework/component-template
==================================

A HTML - PHP template module based on the PHP build in template engine.

v1.0.0(3y ago)021MITPHPPHP &gt;=8.1

Since Jul 1Pushed 1y agoCompare

[ Source](https://github.com/volta-framework/component-template)[ Packagist](https://packagist.org/packages/volta-framework/component-template)[ Docs](https://github.com/volta-framework/component-template)[ RSS](/packages/volta-framework-component-template/feed)WikiDiscussions main Synced today

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Volta\\Components\\Templates
============================

[](#voltacomponentstemplates)

An HTML - PHP template module based on the PHP build in template engine.

 ```
%%{init: {'theme':'dark'}}%%
classDiagram
    class Volta_Component_Templates_Exception
    ExceptionThrowable
    Throwable..|>Exception
    class Volta_Component_Templates_NotFoundException
    Volta_Component_Templates_ExceptionVolta_Component_Templates_Template
    class ArrayAccess {
         	&lt;&lt;interface&gt;&gt;
    }
    ArrayAccess..|>Volta_Component_Templates_Template
    Stringable..|>Volta_Component_Templates_Template
    class Volta_Component_Templates_View {

    }
    Volta_Component_Templates_Template 'Unknown page'
]);

// add placeholders using the set function
$view->set('description', 'A simple home page')

// or use array access
$view['keywords'] = 'home, simple';

// add the template for the content and overwrite some off the parents
// placeholders
$view->addSubTemplate('content', 'content.html.php', ['title' => 'Contact'])

// render the view
echo $view;
```

`layout.html.php`

```
