承接 cgoit/contao-persons-bundle 相关项目开发

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

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

cgoit/contao-persons-bundle

Composer 安装命令:

composer require cgoit/contao-persons-bundle

包简介

Display data for commonly used persons in contao

README 文档

README

Dynamic JSON Badge CI

It often happens that information about people is displayed in many places on a web page. The particular challenge is to keep the individual places in the frontend consistent at all times.

With the help of this module, such people can be managed centrally in the backend of Contao in a clear list. The data from this list can then be easily used and displayed in different places in the frontend.

Install

composer require cgoit/contao-persons-bundle

BREAKING CHANGES

Starting with version 3.0.0 this extension uses TWIG templates instead of the deprecated html5 templates. You can still customize your templates. In the following table you can find an overview how the old templates map to the new ones.

old HTML5 template new TWIG template
Content Element to display a list of persons ce_person.html content_element/persons.html.twig
Frontend module to display a list of persons mod_person.html5 frontend_module/persons.html.twig
Template for one person person.html5 component/person.html.twig

Configuration

Since version 2.1.0 you can configure the contact information types via the standard mechanism. To do so just add your configuration to the config/config.yml file.

The bundle ships with the following default configuration:

cgoit_persons:
    contact_types:
        email:
            schema_org_type: email
        phone:
            schema_org_type: telephone
        mobile:
            schema_org_type: telephone
        website:
            schema_org_type: url

If you want to add a new contact information type (e.g. fax) you'll have to configure the following:

cgoit_persons:
    contact_types:
        email:
            schema_org_type: email
        phone:
            schema_org_type: telephone
        mobile:
            schema_org_type: telephone
        website:
            schema_org_type: url
        fax:
            schema_org_type: faxNumber
            label:
               de: Fax
               en: Facsimile

By adding the label key to any existing contact_type you can overwrite the default translation (coming from $GLOBALS['TL_LANG']['tl_person']['contactInformation_type_options']['<type name>']).

Template Data

Since version 2.1.0 the contact information data is available in the template in two different ways:

  1. In the template you'll have access to an array contactInfos. This array has entries for each contact information. Each entry is itself an array with three keys: type, label and value.
  2. Each contact information is available in the template. Each person has properties like <type> (e.g. email) and <type>_label (e.g. email_label).

schema.org Data

Since version 2.1.0 you can add schema.org data to your templates like this:

<?php $this->extend('block_searchable'); ?>

<?php $this->block('content'); ?>

<div class="persons">
    <?php foreach ($this->persons as $person): ?>
        <?php $this->insert($person->personTpl, $person->arrData); ?>
        <!-- add schema.org data -->
        <?php $this->addSchemaOrg($this->getSchemaOrgData($person)); ?>
    <?php endforeach; ?>
</div>

<?php $this->endblock(); ?>

cgoit/contao-persons-bundle 适用场景与选型建议

cgoit/contao-persons-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.8k 次下载、GitHub Stars 达 2, 最近一次更新时间为 2023 年 10 月 02 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 cgoit/contao-persons-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 cgoit/contao-persons-bundle 我们能提供哪些服务?
定制开发 / 二次开发

基于 cgoit/contao-persons-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: LGPL-3.0-or-later
  • 更新时间: 2023-10-02