[TYPO3-english] Dynamic path in file.import

Lorenz Ulrich lorenz-typo3 at visol.ch
Wed Mar 2 15:41:25 CET 2011


Hi

Please tell me how the path should look like in the end.

The following example works fine:

page.3 = IMAGE
page.3 {
   file.import.field = subtitle
   file.import.stdWrap.wrap = uploads/|/IMG_6198.JPG
}

For testing I inserted "pics" to the subheader field of the page. So the 
path for the picture will be:

uploads/pics/IMG_6198.JPG


Best regards,


Lorenz


Am 02.03.2011 15:14, schrieb Sune Brodersen:
> Hi Lorenz,
>
> Thanks for the answer. I tried the following:
>
> 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. If I do like this it works:
>
> 10.file.import = uploads/tx_templavoila/
> 10.file.import.current = 1
> 10.file.import.listNum = 0
> 10.file.import.stdWrap.wrap = |
>
> Any ideas?
>
> /Sune
>
>>>> Lorenz Ulrich<lorenz-typo3 at visol.ch>  02-03-2011 15:04>>>
> Hi Sune
>
> Yes, "import" is stdWrap enabled so you could do that.
>
> 10.file.import.field = tx_yourext_yourfieldname
> 10.file.import.stdWrap.wrap = fileadmin/|/template
> 10.file.import.listNum = 0
>
> Needs to be adjusted to your situation, but should work.
>
> See [1]. Every property that has stdWrap appended to the data type is
> stdWrap enabled. An overview of all stdWrap properties can be found on [2].
>
> In TYPO3 4.5 some other elements were stdWrap enabled, this information
> can be found in the TYPO3 wiki on [3].
>
>
> Best regards,
>
>
> Lorenz
>
>
>
> [1] http://wiki.typo3.org/De:TSref/imgResource
> [2] http://wiki.typo3.org/De:TSref/stdWrap
> [3] http://wiki.typo3.org/wiki/Pending_Documentation
>
>
> Am 02.03.2011 14:45, schrieb Sune Brodersen:
>> Hi,
>>
>> I have the following ts in my datastructure:
>>
>> <TypoScript>
>>
>> 10 = IMAGE
>> 10.file.XY = 200,150
>> 10.file.import = uploads/tx_templavoila/
>> 10.file.import.current = 1
>> 10.file.import.listNum = 0
>> 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>
>>
>> Now what i want to do is to use a "dynamic" path for 10.file.import and
>> insert a field from fe_users called cid at the end of the path so it will
>> look like this:
>>
>> "10.file.import = fileadmin/<cid>/template"
>>
>> Is that possible? Cant seem to figure out a way if it should be solved in
>> Typoscript.
>>
>> BR/Sune
>
>
>



More information about the TYPO3-english mailing list