b13/listelements 问题修复 & 功能扩展

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

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

b13/listelements

Composer 安装命令:

composer require b13/listelements

包简介

Adds list elements to tt_content

README 文档

README

About this extension

This extension adds list items to tt_content. It adds a database field tx_listelements_list to tt_content that allows adding flexible list items as IRRE records to any content element.

Installation

Add the extension to your project by installing and adding the TypoScript setup to your site-Extension setup:

@import 'EXT:listelements/Configuration/TypoScript/setup.typoscript'

This adds the configuration for adding the list items as an array listitems to the variables available for your content element's Fluid template, like this:

<f:for each="{listitems}" as="item">
    ...    
</f:for>

alternative: record-transformation dataProcessing

if you use record-transformation dataProcessing for your content-elements the EXT:listelements Site-Set (the TypoScript) is not required you can do

tt_content.<my-ce>.dataProcessing.10 = record-transformation

then you have adapt your templates, e.g.

<f:for each="{record.tx_listelements_list}" as="item">
    ...    
</f:for>

and also the items self, e.g.

{item.header}
{item.images}

instead of

{item.data.header}
{item.listimages}

s. https://docs.typo3.org/m/typo3/reference-typoscript/main/en-us/DataProcessing/RecordTransformationProcessor.html

Backend PageLayoutView preview

This extension adds a PageContentPreviewRendering Listener to resolve ListItems (and if needed further Relations to asses/images) to allow customized display using Fluid templates for the backend Page Layout View.

For TYPO3 Version > 12 the Listener is not required anymore, because TYPO3 use the Record Api to resolve relations automatically.

For TYPO3 Version > 13 the Listener is not used anymore (because the Event changed)

s. https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/14.0/Breaking-92434-UseRecordAPIInPageModulePreviewRendering.html

Migrate or BE-Templates

old:

<ul>
	<f:for each="{listitems}" as="item">
		<li>
			{item.header}
			<f:if condition="{item.processedImages}">
				<f:for each="{item.processedImages}" as="image">
					<f:image src="{image.uid}" treatIdAsReference="true"/>
				</f:for>
			</f:if>
		</li>
	</f:for>
</ul>

new:

<ul>
    <f:for each="{record.tx_listelements_list}" as="item">
        <li>
            {item.header}
            <f:if condition="{item.images}">
                <f:for each="{item.images}" as="image">
                    <f:image src="{image.uid}" treatIdAsReference="true"/>
                </f:for>
            </f:if>
        </li>
    </f:for>
</ul>

Important info on configuration

Remember to add the hiddenpalette to all showitems-configuration for your own content elements to have invisible fields like the language uid saved for all list items.

b13/listelements 适用场景与选型建议

b13/listelements 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 47.78k 次下载、GitHub Stars 达 12, 最近一次更新时间为 2020 年 11 月 13 日, 在 PHP 生态内属于活跃度较高的组件。

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

围绕 b13/listelements 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

  • 总下载量: 47.78k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 12
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 1

GitHub 信息

  • Stars: 12
  • Watchers: 7
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2020-11-13