承接 clash82/ezplatform-website-switcher 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

clash82/ezplatform-website-switcher

Composer 安装命令:

composer require clash82/ezplatform-website-switcher

包简介

Adds option to suggest to the user to visit your website in another language. This bundle uses the main language of the browser in order to redirect to the correct site.

README 文档

README

SensioLabsInsight

With this bundle, you can suggest to the user to visit your website in another language. This bundle uses the main language of the browser in order to redirect to the correct site.

screenshot

Requirements

  • Symfony v2.6 or later
  • eZ Publish 5.4 / eZ Platform 1.x or later

Installation

This package is available via Composer, so the instructions below are similar to how you install any other open source Symfony Bundle.

Run the following command in a terminal, from your Symfony installation root (pick most recent release):

composer require clash82/ezplatform-website-switcher

Enable the bundle in app/AppKernel.php file:

$bundles = array(
    // existing bundles
    new Clash82\EzPlatformWebsiteSwitcherBundle\Clash82EzPlatformWebsiteSwitcherBundle()
);

Add external assets to your bundle:

  • CSS:
bundles/clash82ezplatformwebsiteswitcher/css/website_switcher.css
components/flag-icon-css/css/flag-icon.min.css
  • JS:
bundles/clash82ezplatformwebsiteswitcher/js/website_switcher.js

If you are installing bundle via composer require you must also copy assets to your project web directory. You can do this by calling Symfony built-in command from the project root directory:

php app/console assets:install --symlink

Configuration

This is an example of required settings (config.yml):

ez_website_switcher:
    # name to be used to store banner status
    cookie_name: websiteSwitcherStatus

    # how many days banner should be hidden when user disables the banner?
    days: 365

Supported languages are detected from your eZ Publish / eZ Platform installation.

Usage

Insert the following {{ show_website_switcher_banner() }} helper somewhere in your header template close after body opening tag.

The following optional parameters can be set as an argument in an array format (overrides default settings and parameters from config.yml file):

Parameter Default value Description
cookieName websiteSwitcherStatus Sets your own status cookie name
days 365 Says how many days website switcher banner should be hidden when user disables the banner

Example of usage in standard eZ Publish / eZ Platform application:

{{ show_website_switcher_banner() }}

or

{{ show_website_switcher_banner({
   cookieName: 'myCookie',
   days: 7
}) }}

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-01-02

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固