[TYPO3-ttnews] crop and [more]
Franz Koch
typo at fx.MINUS.graefix.DOT.de
Thu Apr 5 09:21:24 CEST 2007
Hi,
> Great. That is exactly what I was searching for. Thank you. Now
> arises just another problem on my way: The [more]-link appears
> in a news article, which consists only of bodytext or of an
> subheader and which is longer than 270 chars. That's fine.
>
> But if a news article consists of a shorter subhead (< 270 chars) plus
> bodytext, there is no link. Right now I habe two workarounds: First to
> crop at about 150 chars, but that doesn't look good in the LATEST-view.
> Second, and that is a situation, I can hardly explain to the editors,
> to put the subhead in the bodytext and wrap an <h>-Tag around. How can
> I manage this situation? I have tried something with general_stdWrap
> and content_stdWrap, but failed. Has somebody any ideas?
How about simply adding the link to the template ;) Ok, then it would appear in any case, but would fulfill more of your wishes then currently.
Or you could try this (untested - but take it as an opinion):
----------------------------------
subheader_stdWrap {
crop = 270 | ... | 1
append = TEXT
append {
current = 1
split {
max = 2
token = ...
cObjNum = 1||2
// either cropped or not cropped - append link if bodytext is true
1 = TEXT
1 {
value = <span class=morelink> {register:newsMoreLink}</span>
if.isTrue.field = bodytext
}
// subheader is cropped - only append if bodytext is false as the bodytext is checked in 1
2 < .1
2.if.isFalse.field = bodytext
}
}
insertData = 1
}
----------------------------------
Maybe that works :) If not, try to append some value to the corp call after the split token:
crop = 270 | ... <!--dummy--> | 1
--
Kind regards,
Franz Koch
More information about the TYPO3-project-tt-news
mailing list