[TYPO3] special wrap for "new until" pages?
Georg Rehfeld
georg.rehfeld at gmx.de
Sun Jun 10 02:44:31 CEST 2007
Hi all,
because I'm just on this and implemented it the CSS way, may be one or
the other can make use of it. The <a> tags get a class attribute with
possibly more than one class, space sparated.
Georg Rehfeld wrote:
> NO {
> after = [NEW]
> after.if.value.data = date:U
> after.if.isGreaterThan.data = field:newUntil
> }
NO = 1
NO {
... <whatever you need here for your menu entries>
# use the nested stdWrap for the "new", else the final wrap would
# not be done when the page is not new
ATagParams.stdWrap{
# a creative abuse of the date getText, yields ' new'
data = date:\ \n\e\w
# when the page is new ' new' is the value of ATagParams, else ''
if.value.data = date:U
if.isGreaterThan.data = field:newUntil
}
ATagParams.wrap = class="normal|"
}
IFSUB < .NO
IFSUB.ATagParams.wrap = class="normal children|"
# If you ask: huh? CUR is used and ACT instead of ACTIFSUB:
# how can _that_ happen???
# This only occurs, when on a page marked as 'hidden in menu',
# e.g. the 'Thanks' page of a contact form beeing a child of
# the contact form. The menu then indicates, that you still are
# on the contact form page. With this you can format differently.
ACT < .NO
ACT.ATagParams.wrap = class="active|"
ACTIFSUB < .NO
ACTIFSUB.ATagParams.wrap = class="active children|"
CUR < .NO
CUR.ATagParams.wrap = class="current|"
CURIFSUB < .NO
CURIFSUB.ATagParams.wrap = class="current children|"
have a nice weekend,
Georg
--
___ ___
| + | |__ Georg Rehfeld Woltmanstr. 12 20097 Hamburg
|_|_\ |___ georg.rehfeld.nospam at gmx.de +49 (40) 23 53 27 10
(Delete .nospam from mail address)
More information about the TYPO3-english
mailing list