[TYPO3-english] Filelinks CE - variable in 'read from path'

Albert van der Veen albert.van.der.veen at xs4all.nl
Thu Jun 11 18:55:00 CEST 2009


Albert van der Veen wrote:
> Hi all,
> 
> I would like the 'read from path' part to be created based on the 
> username of the FE user. Any ideas on how to accomplish this?
> 
> thanks,
> Albert

Decided to use some Typoscript instead, perhaps this snippet is of use 
to someone else. This lists and links all files in a subdir of 
fileadmin/feupload/. Name of the subdir is the username of the logged in 
FE user.

lib.filelist = TEXT
lib.filelist {
	filelist = fileadmin/feupload/
	filelist.dataWrap = | {TSFE:fe_user|user|username}/
	wrap = <table> | </table>
	split {
		token = ,
		cObjNum = 1
		1.current = 1
		1.wrap = <tr> | </tr>
		1.filelink {
			path = fileadmin/feupload/
			path.dataWrap = | {TSFE:fe_user|user|username}/
			icon = 1
			icon.wrap = <td> | </td>
			size = 1
			size.wrap = <td> | </td>
			file.wrap = <td> | </td>
			jumpurl = 1
			target = _blank
		}
	}
}


More information about the TYPO3-english mailing list