Ser Yoga
Ser Yoga

Reputation: 466

How to use filelink title instead of filename

i want to show the title of a file instead of the filename.

version 6.0.14

my typoscript:

tt_content.uploads.20.renderObj.20.wrap = <span class="csc-uploads-fileName"><i class="fileicon-"></i>|</span>   

tt_content.uploads.20.itemRendering.30.if.isTrue.field = true
tt_content.uploads.20.renderObj.10.file.width = 80

tt_content.uploads.20.renderObj.40.bytes.labels = Byte | KB | MB | GB
tt_content.uploads.20.renderObj.40.wrap = <span class="badge">|</span>

i tried

tt_content.uploads.20.renderObj.20.data = file:current:title

but i wont to show the filename if the title is empty. i dont know how to do it ...

Upvotes: 0

Views: 685

Answers (1)

thv
thv

Reputation: 216

if you are using Version 6.x use:

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

if you are using an older version try to use that (not tested but should work):

tt_content.uploads.20.labelStdWrap.override.if.isTrue.data = register:description
tt_content.uploads.20.labelStdWrap.override.data = register:description
tt_content.uploads.20.labelStdWrap.insertData = 1

Upvotes: 1

Related Questions