Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typo3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Typo36.x:如何在我的下载列表(内容类型文件链接)中显示图标(pdf、jpg…)_Typo3_Typoscript_Typo3 6.1.x - Fatal编程技术网

Typo36.x:如何在我的下载列表(内容类型文件链接)中显示图标(pdf、jpg…)

Typo36.x:如何在我的下载列表(内容类型文件链接)中显示图标(pdf、jpg…),typo3,typoscript,typo3-6.1.x,Typo3,Typoscript,Typo3 6.1.x,有人知道我如何在下载列表中显示文件图标吗?下载列表是用Typo3 6.1.5中的内容类型文件链接创建的? 在旧的打字版本中,我使用了扩展css_文件链接,但它不再工作了 我当前的打字稿设置: tt_content.uploads.20.renderObj = COA tt_content.uploads.20.renderObj.20.data = file:current:title //file:current:description // file:current:name 没有可以使用

有人知道我如何在下载列表中显示文件图标吗?下载列表是用Typo3 6.1.5中的内容类型文件链接创建的? 在旧的打字版本中,我使用了扩展css_文件链接,但它不再工作了

我当前的打字稿设置:

tt_content.uploads.20.renderObj = COA
tt_content.uploads.20.renderObj.20.data = file:current:title //file:current:description // file:current:name

没有可以使用的CSS类吗

像这样:

span.csc-uploads-fileName {
    background: url("../img/icon.png") no-repeat scroll 0 0 transparent;
    height: 40px;
    width: 43px;
    text-indent: -999em;
}

首先,要让TYPO3显示filelinks内容元素中的文件图标,您需要选择除默认设置之外的任何其他CE布局(在“外观”选项卡中)

现在,TYPO3在文件前面加上图标。你可能不会觉得它们太漂亮。如果是,您可以使用打字脚本配置图标的文件路径结束类型:

# path to the folder containing the icons
tt_content.uploads.20.renderObj.15.file.import = fileadmin/folder/to/my/icons/
# wrap to indicate the file type of the icons (defaults to |.gif)
tt_content.uploads.20.renderObj.15.file.wrap = |.png
如果要在不设置布局的情况下全局显示图标,请删除相应的If语句:

tt_content.uploads.20.renderObj.15.stdWrap.if >
当然,您也可以使用CSS选择器来显示正确的图标:

a[href $='.pdf'] { background: url('icons/pdf.png') no-repeat 1px 2px; padding-left: 20px; }