PHPackages                             scarbous/mr\_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. scarbous/mr\_template

ActiveTypo3-cms-extension[Templating &amp; Views](/categories/templating)

scarbous/mr\_template
=====================

Adds the functionality to use a configuration file for TS-Config and TypoScript in your template-extension.

1.1.4(3y ago)3146[1 PRs](https://github.com/Scarbous/mr_template/pulls)PHPPHP ^7.3 || ^7.4 || ^8.0CI failing

Since Apr 5Pushed 2y agoCompare

[ Source](https://github.com/Scarbous/mr_template)[ Packagist](https://packagist.org/packages/scarbous/mr_template)[ RSS](/packages/scarbous-mr-template/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (2)Versions (12)Used By (0)

Mr.Template
===========

[](#mrtemplate)

[![CI](https://github.com/Scarbous/mr_template/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/Scarbous/mr_template/actions/workflows/ci.yml)

What does it do?
----------------

[](#what-does-it-do)

EXT:mr\_template helps you to organize your TypoScript and TSConfig in your Template-Extension.

Why have I created this Extension?
----------------------------------

[](#why-have-i-created-this-extension)

My goal when creating template extensions is to be able to reuse code easily and to configure as little as possible by hand.

With Mr.Template, I can create basic templates and build on them.
 All TypoScripts and TSConfigs are loaded for the respective section of the page tree. (MultiPage support)

How to use?
-----------

[](#how-to-use)

1. Basically download and install the extension.
    It is recommended to install it with composer.
2. Create your Template-Extension your with the \[folder structure\](#Folder structure):
3. Create a `template.yml` in your Template-Extension and add the config like:

```
label: Sample Template
parent: mr_template/base
typoScript:
    - EXT:fluid_styled_content/Configuration/TypoScript
    - EXT:news/Configuration/TypoScript
extensions: # Includes TypoScript in Extensions/[ExtsnsionName]/Configuration/TypoScript
    - fluid_styled_content
    - news
tsConfig: # Can handle TSConfig Files or classes wich implements Scarbous\MrTemplate\Template\Entity\TsConfigInterface
    - EXT:sample_template/Configuration/TsConfig/Page/TCEMAIN.tsconfig
```

4. Define your "site root" and add one empty TypoScript Template to the "site root".
5. Select Template in Sites-Config under Tab "Mr.Template"

### Folder structure

[](#folder-structure)

That the system can do the job your Template Extension needs the following folder structure:

```
sample_template
┣ Configuration
┃ ┣ MrTemplate
┃   ┣ default
