Zum Inhalt springen

pmkhtmlcrop - funktioniert nicht nach Absatz

Erstellt am 4. August 2011 · 4 Antworten · letzte Antwort am 6. September 2011

Tags: Frage

Andrea_Herzog ·

Hallo zusammen,
ich möchte diese Extension verwenden, um die Texte in der Listenansicht von tt_products zu kürzen. Das funktioniert allerdings nur, wenn der Text keine HTML-Tags verwendet. Sobald die einzelnen Absätze in einzelne <p></p> gewrapt werden, wird immer der gesamte Text ausgegeben.
Wenn nur ein Absatz in <p> vorhanden ist, funtkioniert es.

Weiss jemand Rat? Muss irgendwas an der RTE Konfiguration geändert werden?

plugin.tt_products.conf.tt_products.LIST {
field {
note = TEXT
note.postUserFunc = tx_pmkhtmlcrop->htmlCrop
note.postUserFunc.htmlCrop = 50 | ...
}
}

fuss ·

TSREF liefert die Antwort:

cropHTML
(TYPO3 v. >= 4.3.x) Kürzt einen Text unter Wahrung aller HTML Tags.

Somit lautet der entsprechende Abschnitt:

plugin.tt_products {
 conf.tt_products {
  LIST {
   field {
    note = TEXT
    # remove definition of postUserFunc included via tt_products' setup.txt
    note.postUserFunc >
    note.cropHTML = 100|...|1
    # note.noTrimWrap = || mehr|
   }
  }
 }
}

gruss, fuss

Andrea_Herzog ·

Hallo zusammen,
die Extension wird nicht mehr benötigt. Hatte vergessen, das zu posten. HTMLcrop ist mittlerweile in TYPO3 integriert.

plugin.tt_products.conf.tt_products.LIST {
	field {
		title = TEXT
		title.crop = 35 | ... 
		}

Viele Grüße,

Andrea

fuss ·

crop ist nicht gleich HTMLcrop.

Daher muss es -sofern das title field HTML-Tags enthält- auch dort

title = TEXT
title.HTMLcrop = 35 | ...

lauten.

gruss, fuss