battis / bootstrapsmarty
此包已被弃用且不再维护。未建议替代包。
Bootstrap UI环境中为Smarty设置(并维护)默认值的包装器
v2.0.1
2017-05-24 17:21 UTC
Requires
- battis/data-utilities: ~0.1
- bower-asset/bootstrap-colorpicker-2.x: ~2.3
- bower-asset/bootstrap-datepicker-1.x: ~1.6
- bower-asset/bootstrap-sortable-2.x: ~2.0
- fxp/composer-asset-plugin: ^1.1
- smarty/smarty: ~3.1
README
Bootstrap UI环境中为Smarty设置(并维护)默认值的包装器
安装
因为此包使用了由Bower管理的客户端文件以及由Composer管理的后端,所以在尝试使用此包之前运行以下命令非常有帮助:
composer global require "fxp/composer-asset-plugin:^1.1"
了解更多关于fxp/composer-asset-plugin
和Bower的信息。
然后在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文档也在线上。