lexik/cmsi18n-bundle

Lexik mini i18n CMS bundle for Symfony2.

安装: 70

依赖项: 0

建议者: 0

安全: 0

类型:symfony-bundle

v1.4.1 2017-02-02 13:33 UTC

This package is auto-updated.

Last update: 2024-08-26 22:38:22 UTC


README

先决条件

此捆绑包需要 Symfony 2.8+

安装

composer require lexik/cmsi18n-bundle 添加到您的 composer.json 文件中

php composer.phar require "lexik/cmsi18n-bundle"

app/AppKernel.php 中注册该捆绑包

public function registerBundles()
{
    return array(
        // ...
        new Lexik\Bundle\CMSI18nBundle\LexikCMSI18nBundle(),
    );
}

配置

在您的 config.yml 中配置 SSH 密钥路径

lexik_cmsi18n:
    frontend_layout: '::base.html.twig'
    preferred_locales: []
    templating_extensions: []

用法

Twig

{{ page_path(block_reference) }}

{{ page_content(block_reference) }}

{{ cms_block(block_reference) }}