[TYPO3] sitemap w/ abstract - totally suppress menu item if no abstract?
Paul Vetch
paul at qedstudio.com
Fri Jul 11 01:02:42 CEST 2008
Hi,
I'm trying to tweak the sitemap with abstract (tt_content.menu.20.4) so that
if there is no abstract data for a page then *nothing* at all is output for
that page - no title, no link, no nothing. Trouble is I can't get it to
work, and I'm beginning to wonder if I can actually do this with a TMENU at
all...? I've tried a condition on allWrap.cObject, and I can easily get
conditional output depending upon whether or not there's an abtract, but I
can't totally suppress the output if there's no abstract, and that's what I
need.
What I really want to be able to do is the equivalent of NO.if.isTrue.field
= abstract ... :)
My temporary, horrible 'solution' at the moment is use allWrap.override to
place a div with display:none around the menu items I don't want! I'm
really traumatised by the inelegance of this - I'd be very happy if someone
could put me out of my misery.
FWIW my TS at the moment is
tt_content.menu.20.4 {
wrap = <div class="sm">|</div>
1 = HMENU
1 {
special = directory
special.value.field = pages
1 = TMENU
1 {
noBlur = 1
NO {
allWrap = <li>|</li>
allWrap.override = <li style="display:none">|</li>
allWrap.override.if.isFalse.field = abstract
stdWrap2.wrap = <h3>|</h3>
linkWrap = |<b>Read this article...</b>
ATagParams =
ATagBeforeWrap = 1
ATagTitle.field = title
stdWrap.htmlSpecialChars = 1
after {
required = 1
data = field:abstract
wrap = <p>|</p>
}
}
}
}
}
Thanks as always
Paul
More information about the TYPO3-english
mailing list