markocupic/contao-rsce-backend-info-image

将信息图片添加到您的 rsce 配置文件中

1.0.8 2023-02-24 08:26 UTC

This package is auto-updated.

Last update: 2024-09-07 08:51:10 UTC


README

Contao CMS 的 Rocksolid 自定义元素后端信息图片插件

此插件扩展了 madeyourday/contao-rocksolid-custom-elements。该扩展允许您在 rsce 元素类型旁边显示缩略图。

Contao Rocksolid Custom Element Backend Info Image

图片配置

您可以在 rocksolid 自定义元素的配置文件中进行图片配置。Contao Rocksolid Custom Element Backend Info Image

安装

执行以下命令以安装扩展

composer require markocupic/contao-rsce-backend-info-image

插件配置

图片 HTML 标记、图片大小和 "add_after_regex_pattern" 可以在您的项目 config/config.yml 中自定义。

# config/config.yml
markocupic_contao_rsce_backend_info_image:
 image_markup: '<div class="long widget rsce-backend-info-image"><div class="rsce-backend-info-image-inner"><img src="###IMAGE_SRC###" alt="###IMAGE_ALT###"></div></div>'
 add_after_regex_pattern: /<legend onclick="AjaxRequest\.toggleFieldset\(this,\'([a-z]+)_legend\',\'([a-zA-Z0-9-_]+)\'\)">([a-zA-Z0-9 ]+)<\/legend>/
 image_size: [400, '', 'proportional']

本扩展由 kda.studio 赞助,德国 Offenbach am Main,63067