[TYPO3-english] Filelinks in pure TS

Kay Strobach typo3 at kay-strobach.de
Mon Nov 21 23:27:02 CET 2011


Hello guys,

for a customer i need to change the rendering of the filelist in TS.
I know that there is an extension called css_filelist which changes the
userfunc, but i'm sure, there must be a way to achieve that in pure TS!

So the goal to achieve is to get filelinks like:

[download *.jpg, 24 KB]

Where the complete string from [ to ] is linked to the file (please
don't discuss the Usability, as i've done that before, the asterik is
static ...)

My current solution just links the file extension, but not the size

tt_content.uploads.20 >
tt_content.uploads.20 = COA
tt_content.uploads.20 {
	10 = TEXT
	10 {
		wrap = <ul>|</ul>
		if.isTrue.field = media
		field = media
		split {
			token = ,
			cObjNum = 1
			1 = TEXT
			1 {
				wrap = <li>|</li>
				1 = TEXT
				1 {
					current = 1
					filelink {
						path = uploads/media/
						icon = 0
						icon.wrap = |
						icon_link = 0
						icon_image_ext_list = png,gif
						size = 1
						size.noTrimWrap =  | |  |
						size.bytes = 1
						size.bytes.labels =  B | KB| MB| GB
						size.wrap =,&nbsp;|
						stdWrap {
							innerWrap = [download *.|]
						}
						#ATagBeforeWrap = 1
						labelStdWrap {
							split {
								cObjNum = 1 || 2
								token = .
								2 {
									current = 1
								}
							}
						}
					}
				}
			}
		}
	}
}


I would appreciate any tipp ;)

Thanks in advice
Kay

-- 
http://www.kay-strobach.de - Open Source Rocks

TYPO3 .... inspiring people to share!
Get involved: http://typo3.org

Answere was usefull: https://flattr.com/profile/kaystrobach


More information about the TYPO3-english mailing list