This page is still a beta!

1.4. Configuration

Files:

File:

Description:

class.tx_ttnews_teasertext.php

Main PHP-class used to create teaser text.

folders:static/tt_news_teasertext_template

static extension template defining basic rendering options.

Reference

plugin.tt_news properties: TS configuration.

Property:

Data type:

Description:

Default:

Display Settings for  ”LIST” and “LATEST”:

  

teasertext_stdWrap

->stdWrap

stdWrap for display of the teaser text

Example:

plugin.tt_news.displayList.teasertext_stdWrap {
  method = PARAGRAPH
  limit = 3

}

This will create a teaser text from the first three paragraphs of the news' bodytext. If limit is 0, no text will be rendered. The complete bodytext will be rendered when limit is negative.

There are three methods for creating the teaser text:

PARAGRAPH: limits the teaser based on paragraphs.

SENTENCE: limits the teaser based on sentences. Sentences are ended by a dot (.) followed by a space or paragraph character.

WORD: limits the teaser based on words.

[tsref:plugin.tt_news]

TypoScript Examples:

Renders teaser with first two sentences in LATEST view:

### LATEST news with two sentences

plugin.tt_news {
  displayLatest { 
    textteaser_stdWrap.method = SENTENCE
    textteaser_stdWrap.limit = 2
  }

}

How to get rid of the <p class="bodytext">  wrap ?

Add one of the following lines to your TS-Setup field:

# this will remove the complete <p> tag from text teasers

plugin.tt_news {  displayLatest.textteaser_stdWrap {

    parseFunc.nonTypoTagStdWrap.encapsLines.nonWrappedTag >

  }

  displayList.textteaser_stdWrap {

    parseFunc.nonTypoTagStdWrap.encapsLines.nonWrappedTag >

  }

}