定制 az-digital/background_image_formatter 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

az-digital/background_image_formatter

Composer 安装命令:

composer require az-digital/background_image_formatter

包简介

Fork of Drupal Simple Background Image Formatter module with D10 support.

关键字:

README 文档

README

Background Image Formatter
================


Introduction
------------


This module provides an image formatter that allows you to display the image
in a div as background image.
The module extends Drupal's images field. Because settings are attached
to the entity, it's very easy to setup and manage.



Features
--------

1. No module dependencies (Other that image).

2. Works with Drupal's field UI.

3. Works with Views.

4. Integrates with Drupal's image styles.

5. Offers 2 modes. (Inline Style & CSS Selector)



Inline Style
------------

Instead the generating the normal img markup we now generate
the div with a inline style.

This

<img src="PATH" />

is changed to

<div class="[YOUR CLASS]" style="background-image:
url('[ABSOLUTE PATH]')">&nbps;</div>



CSS Selector
------------

This option prevents the img tag from being printed to the dom and instead
generates a stylesheet in the dom.

The expected out with be something like this.

<style>
[YOUR SELECTOR] {background-image: url('[ABSOLUTE PATH]');}
</style>



Basic Installation
------------------

1. Download and enable the module.

2. Go to Administration >  Structure > Content Types (admin/structure/types).

3. Click on Manage Display for the relevant content type.
(admin/structure/types/manage/page/display)

4. Change the Format to Background Image for the relevant image field.

5. Click on the settings gear to define your settings.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-2.0
  • 更新时间: 2023-06-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固