werkint/templating-bundle
最新稳定版本:v0.1.1
Composer 安装命令:
composer require werkint/templating-bundle
包简介
README 文档
README
Deprecated
use twig compile instead; and you can use bower
Composer
composer require 'werkint/templating-bundle:dev-master'
Kernel
AppKernel::registerBundles:
...
new \Werkint\Bundle\TemplatingBundle\WerkintTemplatingBundle()
...
Routing
app/config/routing.yml:
werkint_templating.:
resource: "@WerkintTemplatingBundle/Resources/config/routing.yml"
prefix: "/api"
options:
expose: true
$router->generate('ajax_templating', ['template' => '@YourBundle/Some/someTemplate.twig'])
OR
define([
'some-module/views/view',
'werkint-templating/template!@YourBundle/Some/someTemplate.twig'
], function (View, template) {
'use strict';
return View.extend({
'template': template,
});
});
JS
bower install template --save
or include web/bundles/werkinttemplating/js/*.js
Public templates
@YourBundle/Resources/config/templates.yml:
parameters:
your_bundle.public_templates:
- @@YourBundle/Some/someTemplate.twig
services:
your_bundle.public_template_provider:
class: Your\Bundle\SomeBundle\Service\TemplateProvider
arguments:
- % your_bundle.public_templates%
tags:
- {name: werkint_templating.public_template }
Or Werkint\Bundle\TemplatingBundle\Service\TemplateProviderInterface
统计信息
- 总下载量: 923
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-06-09