[Typo3] condition for media field, simpler then [userFunc] ?
"Rafael Schär [beYou media]"
typo3 at goldkueste.ch
Wed Feb 2 19:28:56 CET 2005
JoH wrote:
>>May anybody could help me out? I don't have access on localconf.php.
>>Thats why I try to find another solution for checking the current page
>>and its media field.
>>
>>I want to bind the random pic plugin, when nothing is set on the
>>current page.
>>
>>the goal is a substitution for this kind of script:
>>
>>[userFunc = user_checkPagemedia({$pageUid})]
>>lib.media = IMAGE
>>lib.media.file {
>> import.data = levelmedia: 4, slide
>> import = uploads/media/
>> import.listNum = 0
>> }
>>
>>[else]
>>
>>lib.media < plugin.tx_randompic
>>
>>[end]
>>
>>subparts.media < lib.media
>
>
> Have a look at TSref --> stdWrap --> ifEmpty
> This can be combined with a cObject.
>
> Something like
>
> 10 = COA
> 10 {
> 10 = TEXT
> 10.field = title
> stdWrap.ifEmpty.cObject = COA
> stdWrap.ifEmpty.cObject {
> 10 = TEXT
> 10.value = whatever
> }
> }
>
> will give you "whatever" each time the field "title" is empty.
> Modify this to your needs and you will get it without any condition.
>
> Joey
>
>
thnx a lot, i give it a try
Rafael
More information about the TYPO3-english
mailing list