【发布时间】:2019-09-30 12:54:56
【问题描述】:
我为一个模块创建了一个模板,并想打印以将图像作为背景。
如果我这样做,
{{content.field_background_image}}
我看到图片路径:/sites/default/files/2019-09/carrots-1082251_1280.jpg
但是如果我在 HTML 中尝试它,当我刷新它时页面会中断:
<div class="slide-content-wrapper" style="background-image: url('/{{ content.field_background_image }}')">
如何将内容图片作为背景?
【问题讨论】: