I want to change the layout of the filelinks a little bit. I'm still a TS beginner, so please bear with me.
Here is what I need to have as output:
<ul class="list__download">
<li>
<a href="/#" class="list__link">Preisblatt A
<span class="list__info">2.3 MB / PDF</span>
</a>
</li>
<li>
<a href="/#" class="list__link">Preisblatt B
<span class="list__info">2.3 MB / PDF</span>
</a>
</li>
<li>
<a href="/#" class="list__link">Preisblatt C
<span class="list__info">689 GB / SFV</span>
</a>
</li>
</ul>
My initial approach in the TypoScript was like this:
tt_content.uploads.10.10.1.dataWrap = <h2>|</h2>
tt_content.uploads.20.stdWrap.dataWrap = <ul class="list__download">|</ul>
tt_content.uploads.20.renderObj.wrap.cObject.10.oddEvenClass >
tt_content.uploads.20.renderObj.wrap.cObject.10.elementClass >
tt_content.uploads.20.renderObj.wrap.cObject.20.value = <li>|</li>
tt_content.uploads.20.renderObj.20 = COA
tt_content.uploads.20.renderObj.20 {
10 = TEXT
10 {
data = file:current:title
wrap = |
}
15 < linebreak
20 = TEXT
20 {
data = file:current:description
wrap = <span class="list__info">|</span>
}
wrap = <a href="#" class="list__link">|</a>
}
tt_content.uploads.20.renderObj.30 >
With this TS it looks exactly the way I want it to be, but of course the actual link to the file is gone (only replaced it with this dummy a-Tag wrap).
I also tried to write this code block to:
tt_content.uploads.20.renderObj.20.data
instead of the default
file:current:title // file:current:name
but then the elements are completely missing.
Can you help a TS-newbie out? How can I achieve to get my desired layout, and link a- and span-Tag to my uploaded file?
Thank you very much in advance
typolinkfunction. - pgampett_content.uploads.20.renderObj.20element, even with my code applied. But when I remove my a-Tag wrap line, there is no link at all, only my inserted text. Could you help me out here? I'm a real beginner with TS and am struggling big time. - LilaQ