mouf/html.template.mouftemplate 问题修复 & 功能扩展

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

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

mouf/html.template.mouftemplate

最新稳定版本:v2.1.0

Composer 安装命令:

composer require mouf/html.template.mouftemplate

包简介

This package contains a template for the Mouf administration interface. The content is automatically adjusted to the website page to use all the width. Anyway, you can use this component as a model if you like.

README 文档

README

MoufTemplate is the HTML template used for the Mouf project.

It is obviously a Mouf package, and extends the Mouf TemplateInterface. This means that if you are using Mouf, you can use the MoufTemplate in every place you would need a template implementing the TemplateInterface.

MoufTemplate has 5 zones: content, top, left, right and bottom. Fill these zones using the Mouf UI.

Here is a sample code:

<?php 
// Let's import all required classes
use Mouf\Html\Template\MoufTemplate\MoufTemplate;
use Mouf\Html\HtmlElement\HtmlBlock;

define ('ROOT_URL', "/composertest/");

require_once 'vendor/autoload.php';

// WARNING! this code is only to explain the inner workings of the MoufTemplate class
// Usually, you would never create a new instance of MoufTemplate, nor would you create 
// the $contentBlock or $leftBlock variables.
// Those are created and injected by Mouf, for you.

// Let's define the main content block
$contentBlock = new HtmlBlock();
$contentBlock->addText("Hello world!");

// Let's define the left content block
$leftBlock = new HtmlBlock();
$leftBlock->addText("My left menu!");

// Let's display the template
$template = new MoufTemplate();
$template->setContent($contentBlock);
$template->setLeft($leftBlock);
$template->toHtml();

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2012-10-16