我正在处理 Concrete5 中的页面类型,该页面类型具有使用图像作为背景的全角部分。这是页面应该看起来的样子,这里是 C5 中的。我使用了这个 C5 论坛帖子中描述的技术,但没有任何运气。我认为这个问题可能与对图像文件的引用有关。我不明白该属性如何与实际图像文件相关联。这是我的代码中包含的代码:
?php
$bg_img = $c->getAttribute('gymMatBackgroundImage');
$bg_img_src = $bg_img->getRelativePath();
?>
<style type="text/css">
.bar4 {
background-image: url(<?php echo $bg_img_src; ?>);
}
</style>
这是需要背景图片的部分:
<div class="fullWidthBar bar4">
<div class="row">
<div class="large-12 columns">
<h3>Sign Up</h3>
<div style="width: 50%; height:300px; background-color:white; float:right;">Calendar Placeholder</div>
<p>Sign on for a three or six month commitment to recieve a discount</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
</div>
</div>
</div>
任何帮助深表感谢!