承接 b13/listelements 相关项目开发

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

邮箱: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.

统计信息

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

GitHub 信息

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

其他信息

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