定制 dariuszp/silverstripe-betterslug 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

dariuszp/silverstripe-betterslug

最新稳定版本:0.5.0

Composer 安装命令:

composer require dariuszp/silverstripe-betterslug

包简介

Better slug transliterator for Silverstripe with accent folding

README 文档

README

Slug generator with accent folding for Silverstripe CMS

This module will provide better text to slug translation for silverstripe by replacing very basic transliterator with cocur/slugify module: https://github.com/cocur/slugify

Installation:

  composer require dariuszp/silverstripe-betterslug
  // or if you have .phar package
  ./composer.phar require dariuszp/silverstripe-betterslug

Usage

When you create page with title like this:

Τάρτες ατομικές με γέμιση πορτοκαλένιας κρέμας και γλυκό πορτοκάλι

It will be translated to:

tartes-atomikes-me-gemisi-portokalenias-kremas-kai-gliko-portokali

Istead of page-41 like before.

In case some characters are not handled, you can further configure module by add your own translation rules. For example:

_config.yml

BetterSlug:
  rulesets:
    symbols:
      active: true
      map:
        ☂: ubrella
        ☁: cloud

This will turn:

When you see dark ☁, bring an ☂!

Into:

when-you-see-dark-cloud-bring-an-ubrella

统计信息

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

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-09-07