[TYPO3-english] Dynamic path in file.import
Sune Brodersen
Sune at talefod.dk
Wed Mar 2 16:09:39 CET 2011
Hi Joey,
The thing is that i both need the "currentfilename" plus the value of a
fe_user field called "cid", that should be loaded from the logged in user.
Its all done in a FCE datastructure with a field of etype:imagefixed.
My full XML for that field looks like this:
<image type="array">
<tx_templavoila type="array">
<title>Image</title>
<sample_data type="array">
<numIndex index="0"></numIndex>
</sample_data>
<eType>imagefixed</eType>
<TypoScript>10 = IMAGE
10.file.XY = 200,150
10.file.import = uploads/
10.file.import.current = 1
10.file.import.listNum = 0
10.file.import.stdWrap.wrap = |tx_templavoila/
10.file.maxW.field = img_width
10.file.minW.field = img_width
10.file.maxH.field = img_height
10.file.minH.field = img_height
10.stdWrap.typolink.parameter.field = link</TypoScript>
<proc type="array">
<int>0</int>
<HSC type="integer">0</HSC>
<stdWrap></stdWrap>
</proc>
<preview></preview>
</tx_templavoila>
<TCEforms type="array">
<label>Image</label>
<config type="array">
<type>group</type>
<internal_type>file</internal_type>
<allowed>gif,png,jpg,jpeg</allowed>
<max_size>1000</max_size>
<uploadfolder>uploads/tx_templavoila</uploadfolder>
<show_thumbs>1</show_thumbs>
<size>1</size>
<maxitems>1</maxitems>
<minitems>0</minitems>
</config>
</TCEforms>
</image>
I know that i can get value of fe_user like this:
10 = TEXT
10.data = TSFE:fe_user|user|cid
But i cant figure out how to put it all together. Maybe it also has to do
with <uploadfolder>uploads/tx_templavoila</uploadfolder> ? I guess that also
has to be dynamic? Maybe its actually here the problem is. The reason why
the image is not generated is because its not there at all?
/Sune
>>> JoH asenau<info at cybercraft.de> 02-03-2011 15:44 >>>
> 10.file.import = uploads/
> 10.file.import.current = 1
> 10.file.import.listNum = 0
> 10.file.import.stdWrap.wrap = |tx_templavoila/
> Just to test if it would then use "uploads/tx_templavoila/ as upload
path.
> But i does not work.
this would result in a path like
uploads/currentfilenametx_templavoila/
it should be
10.file.import.stdWrap.wrap = tx_templavoila/|
cheers
Joey
More information about the TYPO3-english
mailing list