numero2/contao-backend-helper 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

numero2/contao-backend-helper

最新稳定版本:1.0.4

Composer 安装命令:

composer require numero2/contao-backend-helper

包简介

Adds some helpers in the Contao backend.

README 文档

README

A collection of small tools that help simplify everyday backend work.

Note

Please note that, except for the page info field, all other helpers must be explicitly enabled via the config.yaml.

Info Field for Pages / Articles

Sometimes it is useful to provide editors or users with additional information about a page or article directly within the page structure. This is especially helpful for multilingual installations where not everyone may know, for example, what a specific page is named like in Japanese.

"Enforcing" Accessibility

By enabling the a11y_enforcer helper (see Example Configuration below), you can require editors to provide an alternative text and/or a caption when using images. At the moment, this feature only applies to the field singleSRC field within tl_content.

Highlighting Long Words

Especially in the age of responsive websites, it is important to ensure that content displays properly across different devices. Very long words can cause layout issues. Contao provides a basic entity for so-called “soft hyphens” ([-]), which allows words to break at predefined positions when necessary. After enabling the long_word_highlighter helper and defining the minimum word length (min_length) - which highly depends on the specific layout - editors can activate the highlighting feature to easily identify words that should be separated with soft hyphens.

Requirements

Installation

Via Contao Manager or Composer:

composer require numero2/contao-backend-helper

Example Configuration

backend_helper:
    a11y_enforcer:
        enabled: false                          # disabled by default
        defaults:
            img_require_alt: true               # alt texts are mandatory
            img_require_caption: false          # captions are not mandatory
        filter:
            - "do=news.*[?&]table=tl_content"   # force checks only on content elements within news articles
    long_word_highlighter:
        enabled: false                          # disabled by default
        min_length: 10                          # every word with more than 10 letters is considered as too long

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 3
  • Forks: 0
  • 开发语言: JavaScript

其他信息

  • 授权协议: LGPL-3.0-or-later
  • 更新时间: 2024-08-06