[TYPO3-english] 'negate' menu item if 'media' is empty
Victor Livakovsky
v-tyok at mail.ru
Tue May 4 13:10:15 CEST 2010
Hi, members of a list.
I have a menu, which shows an image, set in 'media' field of a page as a
part of menu item. And those pages, that doesn't have any images in 'media'
field shouldn't appear in menu. I partially achieved this with such TS:
lib.imgMenu = HMENU
lib.imgMenu {
1 = TMENU
1.NO {
allWrap = <div class="imgEntry">|</div>
beforeImg {
import.data = field:media
import = uploads/media/
import.listNum = 0
height = 134
}
beforeImgLink = 1
# disable wrapping of item
allWrap.if.isFalse.field = media
allWrap.if.negate = 1
# disable link text
stdWrap.if.isFalse.field = media
stdWrap.if.negate = 1
}
}
This works good, but I'm still getting: <a href="menu/item6.html"></a>
for a pages with empty 'media' field.
I tried to play with doNotLinkIt, since it has stdWrap properties as well,
but I can't get, how can I pass 'true' to it, when 'media' is empty. I'll
appreciate any hints.
Or, maybe, there is another way to disable menu item?
More information about the TYPO3-english
mailing list