PHPackages                             artoodetoo/dirk - 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. artoodetoo/dirk

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

artoodetoo/dirk
===============

PHP template system

v1.0.1(9y ago)3461[3 issues](https://github.com/artoodetoo/dirk/issues)MITPHPPHP &gt;=5.4.0

Since Feb 25Pushed 9y ago2 watchersCompare

[ Source](https://github.com/artoodetoo/dirk)[ Packagist](https://packagist.org/packages/artoodetoo/dirk)[ RSS](/packages/artoodetoo-dirk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

Dirk PHP Templates
==================

[](#dirk-php-templates)

Tiny and powerfull template engine with syntax almost the same as in laravel/blade.

### Installation

[](#installation)

The package can be installed via Composer by requiring the "artoodetoo/dirk" package in your project's composer.json.

```
{
    "require": {
        "artoodetoo/dirk": "dev-master"
    }
}
```

### Usage

[](#usage)

**/views/hello.dirk.html**

```
@extends('layout/main')

Hello {{{ $name }}}!

{{ $timestamp or 'Timestamp not defined' }}

@section('sidebar')

  @foreach($list as $l)
    {{ $l }} @if($l == 3) is equal 3 ! @endif
  @endforeach

@endsection
```

**/views/layout/main.dirk.html**

```
>

Example

@yield('sidebar', 'Default sidebar text')

@yield('content')

```

**/web/index.php**

```
