psmb/term
最新稳定版本:3.0.1
Composer 安装命令:
composer require psmb/term
包简介
Replace occurrences of terms with links to them
README 文档
README
This package will help you to automatically link all occurrences of your terms within given text. Great for SEO and stuff.
Usage
1. Install the package
composer require psmb/term
2. Add Psmb.Term:TermMixin to the nodetypes that you want to use as terms
'Your.NodeTypes:Tag':
superTypes:
'Psmb.Term:TermMixin': true
3. Process any text you want with Psmb.Term:ReplaceTerms TS object
E.g. if you want terms to be replaced in all Text nodes:
prototype(Neos.Neos.NodeTypes:Text) {
text.@process.replaceTags = Psmb.Term:ReplaceTerms
}
Processor has option absolute which would force creation of absolute uris.
4. Create term nodes
You may also fill-in their replaceVariants property for alternative spelling
variants, separated by comma, supporting regexp, "+" expands into "\w*?".
E.g. duck+ matches duck, ducks, ducklings etc.
统计信息
- 总下载量: 1.23k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-06-10