battis/bootstrapsmarty

此包已被弃用且不再维护。未建议替代包。

Bootstrap UI环境中为Smarty设置(并维护)默认值的包装器

v2.0.1 2017-05-24 17:21 UTC

This package is auto-updated.

Last update: 2023-05-25 12:39:27 UTC


README

Latest Version Scrutinizer Code Quality

Bootstrap UI环境中为Smarty设置(并维护)默认值的包装器

安装

因为此包使用了由Bower管理的客户端文件以及由Composer管理的后端,所以在尝试使用此包之前运行以下命令非常有帮助:

composer global require "fxp/composer-asset-plugin:^1.1"

了解更多关于fxp/composer-asset-pluginBower的信息。

然后在composer.json中包含以下内容:

"require": {
  "battis/bootstrapsmarty": "~1.0"
}

使用

如果您没有自己的模板

use Battis\BootstrapSmarty\BootstrapSmarty;
$smarty = BootstrapSmarty::getSmarty();

// ...app logic...

$smarty->assign('content', '<p>whatever content you want displayed</p>');
$smarty->display();

如果您有自己的模板目录

$smarty->addTemplateDir('path/to/your/templates_dir');

如果您有自己的样式表

$smarty->addStylesheet('path/to/your/stylesheet.css');

完整的API文档包含在存储库中,而Smarty API文档也在线上。