如何设置带或不带扩展名的typo3的正文背景? [英] How to set the body background for typo3 without or with extension?

查看:68
本文介绍了如何设置带或不带扩展名的typo3的正文背景?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用typo3 v9.5.0.我需要设计一个网站,在其内容元素和菜单中都包裹着背景图片.引导程序包中没有指定的布局.我已经尝试通过上传图片来尝试使用

但是出了点问题.默认情况下,它指向错误的资源(typo3/01_DBM).

我不知道为什么会这样.如果还有其他扩展或技术,请​​建议我.但是我希望它可以动态完成,因为它需要定期更新.

解决方案

  1. TYPO3 9.5.0已过时.尽管您使用它在本地将其更新为当前版本.

  2. 您可以使用多个选项将背景图像集成到整个页面.

以下是我的建议,不需要任何特定扩展名:
使用bootstrap-package时,您可以在自己的站点扩展(应使用)中增强其Fluid-templates.

您从哪里获得图片?

每个 pages 记录(在TYPO3中定义一个页面)都有相关媒体文件的字段(您可以在 Resources 选项卡上找到/设置它.
在这里,编辑者可以轻松地将应用作背景图像的图像插入到内容中.

在页面的变量的活字定义中,您可以为第一个图像定义自己的变量

  10 = FLUIDTEMPLATE10 {[...]数据处理 {111 = TYPO3 \ CMS \ Frontend \ DataProcessing \ FilesProcessor111 {参考 {fieldName =媒体表=页}as = BackgroundImages}}[...]} 

并在流体模板中使用它,例如:

  [...]< div style ="background-image:url(fileadmin/{BackgroundImages.0.originalFile.identifier});">< f:cObject typoscriptObjectPath ="lib.dynamicContent" data ="{pageUid:'{data.uid}',colPos:'0'}"/></div>[...] 

进一步的增强可以使用滑动机制,因此没有自己的背景图像的页面可以使用父页面的图像.

I am using typo3 v9.5.0. I need to design a website with a background image wrapped all over the content element and menu. There is no specified layout in bootstrap package. I've tried extensions like background by uploading the image.

But there is something wrong. By default its pointing the wrong resource which it left(typo3/01_DBM).

I have no clue why it's behaving like that. If there is any other extension or technique, kindly suggest me. But I want it to be done dynamically because it needs regular updation.

解决方案

  1. TYPO3 9.5.0 is outdated. although you use it localy update to current version.

  2. you have multiple options to integrate a background image to the whole page.

Here my recommandation which does not require any specific extension:
As you use the bootstrap-package you can enhance the Fluid-templates of it in your own site-extension (which you should use).

Where do you get the image from?

Every pages record (defining a page in TYPO3) has fields for related media files (you can find/set it on the Resources tab.
Here an editor can easily insert an image which should be used as a background image to the content.

In your typoscript definition of variables for the page you can define an own variabel for the first image

10 = FLUIDTEMPLATE
10 {
    [...]
    dataProcessing {
        111 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
        111 {
            references {
                fieldName = media
                table = pages
            }
            as = BackgroundImages
        }
    }
    [...]
}

and use it in the fluid template for the page like:

[...]
<div style="background-image:url(fileadmin/{BackgroundImages.0.originalFile.identifier});">
    <f:cObject typoscriptObjectPath="lib.dynamicContent" data="{pageUid: '{data.uid}', colPos: '0'}" />
</div>
[...]

further enhancements could use a sliding mechanism, so a page without own background-image could use the image of parent page.

这篇关于如何设置带或不带扩展名的typo3的正文背景?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆