scarbous/mr_template 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

scarbous/mr_template

Composer 安装命令:

composer require scarbous/mr_template

包简介

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

README 文档

README

CI

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?

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?

  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
  1. Define your "site root" and add one empty TypoScript Template to the "site root".

  2. Select Template in Sites-Config under Tab "Mr.Template"

Folder structure

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

sample_template
┣ Configuration
┃ ┣ MrTemplate
┃   ┣ default <- Template name, one Extension can handle multiple templates
┃   ┃ ┗ template.yml
┃   ┃
┃   ┗ TsConfig
┃     ┗ Page
┃       ┗ Mod
┃         ┗ WebLayout
┃           ┗ BackendLayouts <- Each BackendLayout get its one file.
┃             ┗ default.tsconfig
┃
┃   ┗ TypoScript <- Default TypoScript
┃     ┣ setup.txt
┃     ┗ constants.txt
┃
┣ Extensions <- Overrides for other extensions
┃ ┗ news
┃   ┗ Configuration
┃     ┗ TypoScript
┃       ┣ setup.txt
┃       ┗ constants.txt
┃
┗ Resources
  ┗ Private
    ┣ Layouts
    ┃ ┗ Page
    ┃
    ┣ Partials
    ┃ ┗ Page
    ┃
    ┗ Templates
      ┗ Page

Default TypoScript and TSConfig

Here are some simple Configs I use realy often in Template-Extensions.

TypoScript

EXT:mr_template/Configuration/TypoScript/Page

Add FluidPage Template based on BackendLayout-Name.

EXT:mr_template/Configuration/TypoScript/BackendLayoutBodyClass

Like the folder name say, add the BackendLayout name as class to the body-tag.

EXT:mr_template/Configuration/TypoScript/Config

Some basic configs with configurable constants like:

  • caching
  • concatenateJs
  • concatenateCss
  • compressJs
  • compressCss

TSConfig

Scarbous\MrTemplate\Template\Entity\BackendLayouts

Adds all BackendLayout files under EXT:[sample_extension\]/Configuration/TsConfig/Page/Mod/WebLayout/BackendLayouts

scarbous/mr_template 适用场景与选型建议

scarbous/mr_template 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 146 次下载、GitHub Stars 达 3, 最近一次更新时间为 2021 年 04 月 05 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「template」 「extension」 「typo3」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 scarbous/mr_template 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 scarbous/mr_template 我们能提供哪些服务?
定制开发 / 二次开发

基于 scarbous/mr_template 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 146
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2021-04-05