[TYPO3] problem with the CONTENT object and the .if stdWrap property
John Kavanagh
john.kavanagh at roomthree.com
Mon Jun 16 18:51:34 CEST 2008
Hello,
I am having a problem with the CONTENT object and the .if stdWrap
property....
My Typoscript queries a table in the database and if a value is returned
it displays a specified image and if none appears, it shows another.
temp.randomBannerImage = COA_INT
temp.randomBannerImage {
10 = TEXT
10.value < banner_image01.jpg
10.if.isFalse.numRows < temp.databaseQuery
20 = TEXT
20.value = banner_image02.jpg
20.if.isTrue.numRows < temp.databaseQuery
}
This works okay, but when I changed the 1st image to be a random image
taken from a specified folder I ran into problems!!
temp.getRandomImage = CONTENT
temp.getRandomImage {
table = tt_content
field = images
select {
pidInList = 58
max = 1
orderBy = rand()
}
renderObj=COA
renderObj {
10=TEXT
10 {
wrap=|
field=image
}
}
}
temp.randomBannerImage = COA_INT
temp.randomBannerImage {
10 = TEXT
10.value < temp.getRandomImage
10.if.isFalse.numRows < temp.databaseQuery
20 = TEXT
20.value = banner_image02.jpg
20.if.isTrue.numRows < temp.databaseQuery
}
For some reason both image names appear - it seems the CONTENT item
temp.getRandomImage is igonoring the .if.isFalse statement!!
Can anyone explain why or offer a workaround??
Thanks a million!!
John.
The random image always comes out, ignoring the if.isFalse statement.
More information about the TYPO3-english
mailing list