[TYPO3] Question about standard wrap

Stephen Bungert s.bungert at metrinomics.de
Fri Apr 18 14:53:06 CEST 2008


I have the following bit of typo script:

[globalVar = TSFE:id = 20]
plugin.tt_news.limit = 15
plugin.tt_news.displayList.category_stdWrap.wrap = <span
class="news-list-category"> | </span>
plugin.tt_news.displayList.linkTitleField = bodytext
plugin.tt_news.displayList.linkTitleField.stripHtml = 1
plugin.tt_news.displayList.linkTitleField.stdWrap.crop = 100 | ... | 1
[global]

It seems to do what I want, but not exactly.

This:
plugin.tt_news.displayList.linkTitleField = bodytext
plugin.tt_news.displayList.linkTitleField.stripHtml = 1
plugin.tt_news.displayList.linkTitleField.stdWrap.crop = 100 | ... | 1

Displays the bodytext of an article as a tool tip, cropped to 100 chracters.
The problem is that stripHtml doesn't seem to be working. It removes p tags
but leaves H tags (h1 etc)

An articel that starts with a p tag seems to have it's p tag removed in the
tool tip.

<p>Test test</p> Shows up as Test Text in the tooltip
<h1>Test test</h1> Shows up as <h1>Test test</h1> in the tooltip.

Why is this?

Second, this:
plugin.tt_news.displayList.category_stdWrap.wrap = <span
class="news-list-category"> | </span>

Wraps the category in a span tag pair like I want, but all my categories
start with a prefix followed by a space.

'Abc Cat1' for example. Is it possible using crop to remove the first 4
characters oft the Category name? If so how?

I tried doing this, just to see i fit would even crop it:


plugin.tt_news.displayList.category_stdWrap.crop = 4 | ... | 1

But this didn't do anything. It works for bodytext (I use
plugin.tt_news.displayList.content_stdWrap.crop = 300 | ... | 1 to crop the
body text), so why not for categories?



More information about the TYPO3-english mailing list