tt_news

1.7.2.  

1.7.3. Reference

 

plugin.tt_news properties: TS configuration.

General Settings

Property:

Data type:

Description:

Default:

templateFile

resource

The HTML-template. (See examples: "pi/news_template.tmpl" and "pi/tt_news_v2_template.html" in the ext/tt_news folder). You can define a template for a complete pagetree, a certain page or even a single content element in your TS setup, in the Constant Editor or in the content.element.

 

Example:

  plugin.tt_news {
    templateFile = fileadmin/my_templates/tt_news.html
  }

 

pid_list

string / stdWrap

The page id (pid), or list of pids of the folder(s), where your news are stored in (also known as "Starting point"). If this value is not set, and the "Starting point" field in the news content-element is also empty, the current page is used.
Accepts multiple pids comma separated!

 

Example:

 

  # clear the value
  plugin.tt_news.pid_list >
  # display news records located in page 582 & 584
  plugin.tt_news.pid_list = 582,584

Note:
"Starting Point / pid_list" has nothing to do with the "Storage Pid" (General Record Storage page), which is used for news-categories).

 

dontUsePidList

boolean

In sites with huge pagetrees where it is needed to have the news not in a few sysfolders but in the complete pagetree the check for the pid_list in tt_news can be a big performance eater because thousands of pages have to be checked for visibility and added to the sql query. With "dontUsePidList" enabled it is possible to disable the use of the parameters "pid_list" and "recursive" for tt_news related queries.

 

Example:

  plugin.tt_news.dontUsePidList = 1

 

recursive

Int / stdWrap

If this is given, the "pid_list" is extended by the number of recursive levels.

 

Example:

  plugin.tt_news.recursive = 3

 

code

string / stdWrap

Code to define, what the script does.


Example:

  plugin.tt_news.code = LATEST

 

 singlePid

int+ / stdWrap

Page id of the page where single news are displayed (name changed in tt_news 1.6.0).

Here you can define a page to be used for display of a news item with the "SINGLE" template-part. This setting can also be done in the constant editor or directly in the content element. (the settings done directly in the content element will override settings you made by TS, but they will only affect these certain content element.)


Example:

  # singlePid for a news element inserted by TS
  plugin.tt_news.singlePid = 590

Notice: setting at least one page with a SINGLE news content element as "singlePid" is required (since tt_news 1.3.0)

-> if there's no "singlePid" defined the links that should point to the single view don't work.

The old var-name "PIDitemDisplay" does not work for links to related news anymore (since tt_news 1.6.3)

 

allowCaching

boolean

Allow caching of news.

1

limit

int+ / stdWrap

The maximum number of news-records showing in "LIST" view.

7

latestLimit

int+ / stdWrap

The maximum number of news-records showing in "LATEST" view.

3

alternatingLayouts

Int+

Indicates how many alternating designs the news-script should expect in the html-template.

 

Example:

If you define a subpart like:
"<!--###NEWS###--> ... <!--###NEWS###-->"
this is used all the time.

If you define a similar subpart:

"<!--###NEWS_1###--> ... <!--###NEWS_1###-->"

which might show another set of colors, this is used every second time instead of the default! This is because "alternateLayouts" is set to 2.

If you define a similar subpart

"<!--###NEWS_2###--> ... <!--###NEWS_2###-->" ...

this will be used every third time IF (!) "alternateLayouts" is set to 3. If you do not set it to 3, the first two aternating designs will be used only.

2

altMainMarkers

(array of strings)

Lets you specify alternative subpart markers for the various main template designs in the news template

This is the list of main subparts you can override:

 

Properties:

 

  TEMPLATE_LATEST
TEMPLATE_LIST
TEMPLATE_SINGLE
TEMPLATE_SINGLE_RECORDINSERT
TEMPLATE_ARCHIVE
TEMPLATE_SEARCH
TEMPLATE_ARCHIVE_NOITEMS
TEMPLATE_HEADER_LIST
TEMPLATE_CAT_RELATED
  /+ stdWrap

Example:

This example changes the main subpart marker for the regular news single item display from the default ###TEMPLATE_SINGLE### to the custom supplied design ###SINGLE_CUSTOM### (found in the same template HTML-file)

  
plugin.tt_news
{
altMainMarkers.TEMPLATE_SINGLE = SINGLE_CUSTOM
altMainMarkers.TEMPLATE_SINGLE.wrap = ### | ###
}

 

Settings for Links:

Property:

Data type:

Description:

Default:

useHRDates

boolean

Use human readable dates: This enables the use of the GETvars "year" and "month" for archive links instead of the non-readable vars "pS", "pL" and "arc". Now it's possible to have realUrls like this:

http://www.example.com/news/archive/2005/04/

 

Hint: If you use realUrl, don't forget to adds these new vars to your localconf.php

See section "RealUrl and SimulateStaticDocuments" in this manual for more information.

0

useHRDatesSingle

boolean

Use "human readable dates" even for links pointing to the SINGLE view. Additionaly to "year" and "month" the links to the SINGLE view will show the "day", so realUrls can look like this:

 

http://www.example.com/news/2005/04/11/this-is-awesome/

0

useHRDatesSingleWithoutDay

boolean

Use "human readable Dates" for links to the SINGLE view without "day", so realUrls can look like this:

 

http://www.example.com/news/2005/04/this-is-awesome-too/

 

Example:

  plugin.tt_news {
    useHRDates = 1
    useHRDatesSingle = 1
    useHRDatesSingleWithoutDay = 1
  }

0

backPid

int+

Here you can set the page id of the news list to which to return after looking at a single item.

If you don't set a "backPid" the "Back" link in SINGLE view points to the last LIST or LATEST view. Usually the page that linked to the "SINGLE" view.

If you have clicked to another related item, the "Back" link will still point to the last LIST page.

You can override this behaviour by setting the parameter "backPid" in TS. This lets all "Back" links point to the page you configured there.

 

dontUseBackPid

boolean

If you enable this, you can prevent the use of the variables for dynamic "back-links" in links that point to the single-view. The advantage is, that all those links will look the same, what will f.e. prevent multiple indexing by the indexed search. (RealUrl Links will also look nicer without a "backPid"). The "back-link" in the SINGLE view will still work, but it will only point to a global "backPid" (f.e. the list view).

See section "RealUrl and SimulateStaticDocuments" in this manual for more information.

0

hscBackLink

boolean

If this is enabled the "Back to list" link in the SINGLE view will be parsed through the PHP function htmlspecialchars().

1

pageTypoLink

->typolink

Additional typolink configuration for the links to news which are of type "links to internal pages" or type "external link". With this setting you can override the global settings for targets in your page. Page id/external url parameter is loaded into "current" (TS data array).

This option has no influence on links pointing to normal news records. The target of these links ist configured globally for the whole page.

 

Example:

if you have a page with frames and you want to open links to pages & external urls in a new browser window, use this setting:

  plugin.tt_news {
    pageTypoLink.target >
    pageTypoLink.target = _blank
  }

 

itemLinkTarget

string

Target for the links on category images that choose a certain category. This is only needed if you want to overwrite the global settings for "PAGET_TARGET" from constants.
If you, f.e. use a LATEST element to control a LIST in another frame, set this to the frame name.

 

archiveTypoLink

->typolink

Typolink configuration for links that point to the news archive. This is not a full featured "typolink config array" � only the attributes "parameter" and "addParams" are processed.

  1. used in the "LATEST" element (example html-template) for the link that points to the page with the archive listing (marker: ###GOTOARCHIVE###)

  2. used for links in the "AMENU" element (archive menu). If you want the links in the archive menu point to another page, you can enter the PID of this page here.

Example:

  # points to the page with id=34 and adds '&myvar=foo' to all links.
  plugin.tt_news {
    archiveTypoLink.parameter = 34
    archiveTypoLink.addParams = &myvar=foo
  }

 

linkTitleField

string /stdWrap

Here you can define a field whose content will be inserted as "title" attribute in links pointing to the SINGLE view.

 

Example:

This will insert the content of the field "title" from the tt_news db-record as attribute "title" prepended with "go to ".

  
plugin.tt_news.displayList
{
    linkTitleField = title
    linkTitleField.wrap = go to&nbsp; |
  }

The final link should look like this:

  <a href="news/single/title.html" title="go to title">the title</a>

 

Global Wraps

If you use the new css-based html-template you don't need to define "Global Wraps" and "Global Colors" because the complete visual formating is done with CSS-tyless. But of course those wraps and markers can be used for other purposes.

Property:

Data type:

Description:

Default:

wrap1

-> stdWrap

Global Wrap 1. This will be splitted into the markers ###GW1B### and ###GW1E###. Don't changes the input value, only wrap it in something.

 

Example:

  plugin.tt_news.wrap1.wrap = <strong> | </strong>

 

wrap2

-> stdWrap

Global Wrap 2 (see above)

 

Note: the "Global Wraps" and the "Global colors" are not used in the TS setup for the css based template.

 

wrap3

-> stdWrap

Global Wrap 3 (see above)

 

color1

string /stdWrap

Value for ###GC1### marker (Global color 1)

 

color2

string /stdWrap

Value for ###GC2### marker (Global color 2)

 

color3

string /stdWrap

Value for ###GC3### marker (Global color 3)

 

color4

string /stdWrap

Value for ###GC4### marker (Global color 4)

 

Search Settings

Property:

Data type:

Description:

Default:

searchPid

int+

Page id where searchresults are displayed.

If you want all news searches to go to a specific page, enter the PID here! NOTE: If you set this PID, all searchqueries will (must) be handled with a list content element with the code "SEARCH" on that page.

 

emptySearchAtStart

boolean

If this is set the "SEARCH" content element will show an empty list at start. Otherwise the full list of items is shown.

1

searchEmptyMsg_stdWrap

->stdWrap

stdWrap for the messages from the news-search: "no results" & "no searchword given".

 

Pagebrowser Settings

Property:

Data type:

Description:

Default:

noPageBrowser

boolean

Set this to "1" to completely disable the pagebrowser for all tt_news content elements in a page (can also be set directly in a content element to disable the pagebrowser only for this content element).

Useful in combination with "excludeLatestFromList" or "listStartId", set from the content element.

0

latestWithPagebrowser

boolean

If this is set, the LATEST template can also contain a pagebrowser (you'll have to add one to your template first).

If this is not set (default) the contents of LATEST are not influenced by the pagebrowser.

0

usePiBasePagebrowser

boolean

Here you can configure if the pagebrowser for LIST and LATEST should be rendered by the TYPO3 core class "tslib_pibase" or if the internal pagebrowser from tt_news should be used (the pagebowser can also be renderd by a userfunction -> see "userPageBrowserFunc").

All pagebrowsers will be configured with the configuration array "pagebrowser.".

 

Since TYPO3 3.8.0 the internal pagebrowser from class.tslib_pibase offers some very nice features and its output is completely configurable (see below).

If you use a TYPO3 version below 3.8.0 I recommend to use the pagebrowser from tt_news because it supports caching and it's also possible to use HTML (e.g. images) as "previous" and "more" links.  

0

pageBrowser

pageBrowser configuration array  

Configuration array for the pagebrowser. All properties of the pagebrowser are configured in this array.

 

-> pageBrowser.[options]

This is the configuration array for the pagebrowser. All settings here start with "pageBrowser.". The formating of the pagebrowser is done by CSS. See _CSS_DEFAULT_STYLE at the end of this list for an example.

Property:

Data type:

Description:

Default:

maxPages

int+

The maximum number of pages that are shown in the pagebrowser

7

showPBrowserText

boolean

Here you can choose if the pagebrowser should show texts like "page 1, page..." in the pagelinks or if it should show only numbers.

1

dontLinkActivePage

boolean

If this is set to 1 the current page is not linked linked in the pagebowser

1

tableParams

string

If you didn't set a "browseLinksWrap" you can add parameters for the table that wraps the pagebrowser here.


Example:
(default setting)

  plugin.tt_news {
    pageBrowser {
      maxPages = 10
      showPBrowserText = 1
      tableParams = cellpadding=2
      showResultCount = 1
    }
  }

Hint: If you want to change the default texts like "previous" to something else, you can do this with the TS var "_LOCAL_LANG" (see example at the end of this table). For the names of the language markers see: pi/locallang.xml but don't change the values in this file � they will be overwriiten when you update tt_news. You can change the language labels with the extension "llxmltranslate".

 

showResultCount

0,1,2

In TYPO3 below 3.8.0 this configures if the result count (e.g.: "Displaying results 1 to 4 out of 22") should be shown above the pagebrowser.

 

In TYPO3 version 3.8.0 this var can have 3 values:

  1. 0: only the result-browser will be shown

  2. 1: (default) the text "Displaying results..." and the result-browser will be shown.

  3. 2: only the text "Displaying results..." will be shown

1

alwaysPrev

boolean

If this is enabled the "previous" link will always be visible even when the first page is displayed.

0

showFirstLast

boolean

This is used as switch if the two links named "<< First" and "Last >>" will be shown and point to the first or last page. If "showFirstLast" is enabled "alwaysPrev" will be overwritten (set to 1).

0

hscText

boolean

Here you can choose if the texts for the pagebrowser (eg: "next", "Displaying reaults...") will be parsed through the PHP function htmlspecialchars() or not. Disable this if you want to use HTML in the texts f.e. for graphical "next" and "previous" links.

1

pagefloat

int / keyword

This defines were the current page is shown in the list of pages in the pagebrowser.

If this var is an integer it will be interpreted as position in the list of pages. If its value is the keyword "center" the current page will be shown in the middle of the browse links.

0

showRange

boolean

This var switches the display of the pagelinks from numbers to ranges f.e.: 1-5  6-10  11-15... instead of 1  2  3...

0

browseBoxWrap

stdWrap

This is the wrap for the complete pagebowser (results and browse links). This wrap and the following ones are only available in TYPO3 3.8.0 or higher.

 

Example:

  plugin.tt_news.pageBrowser {
    browseBoxWrap.wrap = <div class="browseBoxWrap">|</div>
    showResultsWrap.wrap = <div class="showResultsWrap">|</div>
    browseLinksWrap.wrap = <div class="browseLinksWrap">|</div>
    showResultsNumbersWrap.wrap = <span class="showResultsNumbersWrap">|</span>
    disabledLinkWrap.wrap = <span class="disabledLinkWrap">|</span>
    inactiveLinkWrap.wrap = <span class="inactiveLinkWrap">|</span>
    activeLinkWrap.wrap = <span class="activeLinkWrap">|</span>
  }

 

showResultsWrap

stdWrap

This wraps the text "Displaying results...".

 

browseLinksWrap

stdWrap

Wrap for the browse links.

 

showResultsNumbersWrap

stdWrap

wrap for the numbers in the text: "Displaying results 1 to 4 out of 22 ".

 

disabledLinkWrap

stdWrap

wrap for disabled links (f.e the "Last >>" link on the last page).

 

inactiveLinkWrap

stdWrap

wrap for inactive links (normal links).

 

activeLinkWrap

stdWrap

wrap for active links.

 

Archive Settings

Property:

Data type:

Description:

Default:

archive

int

Use this if you want to configure a news LIST element inserted by TS to show only archived or non-archives items (this values will be overwritten by values set directly in the tt_news content element)  

  1. -1 = show only non-archived

  2. 0 = don't care

  3. 1 = show only archived

 

Example:

This will setup a news content-element to display only archived items

   plugin.tt_news.archive = 1

 

Note:

The LATEST and the AMENU elements are not affected by archive settings. Neither by the settings from TS nor from the Flexforms settings.

 

datetimeDaysToArchive

int (days)

If this is set, news are automatically in the archive after the given number of days has passed according to their initial datetime value.

Note:

this setting will have priority over a possibly given archivedate. For more information, see section "The Archive" in this manual

 

Example:

This handles all news records older than 30 days as archived.

  plugin.tt_news.datetimeDaysToArchive = 30

0

datetimeHoursToArchive

int (hours)

Same as datetimeDaysToArchive but for hours (can't be combined with datetimeDaysToArchive and datetimeMinutesToArchive).

0

datetimeMinutesToArchive

int (minutes)

Same as datetimeDaysToArchive but for minutes (can't be combined with datetimeDaysToArchive and datetimeHoursToArchive).

 

Note:

If you are using datetimeHoursToArchive or datetimeMinutesToArchive son't forget to set the lifetime of the pagecache to a value that actually allows such short archiving periods

0

enableArchiveDate

boolean

If set, the field "archivedate" is activated for selecting of news records.

1

emptyArchListAtStart

boolean

If this is set, a news LIST element showing only archived items will show nothing at first view, without any given "periodStart"(pS)  or "Lenght"(pL) from GET vars.

The default is to show all archived items, starting from the first item in the archive.

 

reverseAMenu

boolean

If set, newer archive menu items are displayed first

1

archiveMode

string

Determines which archive mode is used

possible values: "month", "year" or "quarter" (see "archiveTitleCObject")

 

Example:

  plugin.tt_news.archiveMode = month

month

archiveTitleCObject

cObject

cObject that renders the title of the archive periods. Note that the data array (current) of the cObject is loaded with an array with the keys:

"start" - starting time of period

"stop" - ending time of period

"quarter" - the quarter of the period (1-2-3-4)

"count" - number of news items in this period

 

Example:

  plugin.tt_news.archiveTitleCObject {
      10 = TEXT
      10.field = start
      10.strftime = %B - %Y
  }

More advanced Example:

This will display an AMENU in quarter periods like this: "Jan - Mar 2005: 3 items". The selected archive period is displayed in bold text.

 

  plugin.tt_news {
    reverseAMenu = 0
    archiveMode = quarter
    archiveTitleCObject >
    archiveTitleCObject = COA
    archiveTitleCObject {
      10 = COA
      10 {
        10= TEXT
        10 {
          field = start
          strftime = %b -&nbsp;
          wrap = <strong>|
        }
        11 = TEXT
        11 {
          field = stop
          strftime = %b %Y
          wrap = |</strong>
        }
        if {
          value.field = start
          equals.data = GPvar:tx_ttnews|pS
        }
      }

      20 = COA
      20 {
        10= TEXT
        10 {
          field = start
          strftime = %b -&nbsp;
          wrap =
        }
        11 = TEXT
        11 {
          field = stop
          strftime = %b %Y
          wrap =
        }
        if {
          value.field = start
          equals.data = GPvar:tx_ttnews|pS
          negate = 1
        }
      }
    }
  }

 

archiveMenuNoEmpty

boolean

If set, there will be no empty elements in the archive menu

1

archiveHeader_stdWrap

->stdWrap

stdWrap for the archive header.

 

archiveEmptyMsg_stdWrap

->stdWrap

stdWrap for the message, that is displayed if no archived items are found at all   

 

Display Settings for  "SINGLE","LIST" and "LATEST"

Property:

Data type:

Description:

Default:

general_stdWrap

->stdWrap

The fields "bodytext", "short" (subheader) and "links" will be processed by this stdWrap settings.

 

Example:

  plugin.tt_news {
    general_stdWrap >
    general_stdWrap {
      parseFunc < tt_content.text.20.parseFunc
    }
  }

This will clear any given "general_stdWrap" from default setup, and parse the content from tt_news through the same parseFunc as normal content like "text" or "text with image".
The handling of the content from RTE depends also on the global settings for the RTE and the RTE-transformations. See section "The Rich-Text-Editor" in this manual.

 

excludeLatestFromList

boolean

[deprecated] use "excludeAlreadyDisplayedNews"

Set this to exclude news records shown in "LATEST" from appearing again in a "LIST" on the same page.

Note: set this only for the page showing the "LIST" element. Otherwise it will affect all lists in your site.  

0

listStartId

int+

[deprecated] use "excludeAlreadyDisplayedNews"

Here you can set the number of the news item which will be displayed as first item in lists. This works also with the LATEST template.

In combination with "limit" you can create complex combinations of several tt_news content elements on one page without displaying double news articles.

 

Example:

This will display a list of 3 news-articles starting from the 5th  record, found in the db. (counting starts at zero)

  plugin.tt_news {
    listStartId = 4
    limit = 3
  }

 

excludeAlreadyDisplayedNews

boolean

This option allows you to place multiple news plugins on one page where each plugin itself takes care that no newsarticle is displayed twice. This feature makes the options "excludeLatestFromList" and "listStartId" obsolete. If "excludeAlreadyDisplayedNews" is enabled "excludeLatestFromList" and "listStartId" will be ignored.

0

displayArchivedInLatest

boolean

By setting this to "1" you can display archived news in the "LATEST" template

0

listOrderBy

string

Here you can set the "ORDER BY" part of the query for LIST and LATEST view.
The special keyword "random" will trigger randomized ordering of news in lists.

 

Use this with care: The query parts, given from TS are only trimmed and not further validated -> if the field don't exist, you'll get a mysql-error

 

Example:

this will order the records by title, beginning with Z:

  plugin.tt_news.listOrderBy = title desc

This will order the news by random:

  plugin.tt_news.listOrderBy = random

Hint:

if you set "asc" or "desc" from the tt_news content-element (flexform) then the "asc/desc" part of listOrderBy will be ignored to prevent a mysql error.

datetime desc

listGroupBy

string

The "GROUP BY" part of the query: if you set "listGroupBy = category"
the string "category" is processed in a special way, because the tt_news_cat_mm table is not joined by default. This simulates the "group by category" functionality by joining the mm table to the tt_news table. (see line 745 in class.tx_ttnews.php).

Restriction: This works only correct, if the news records have only one category assigned.

Example:

This will fill the object "lib.newsLatest" with a news content-element that displays only the newest item of each category

  lib.newsLatest < plugin.tt_news
  lib.newsLatest {
    code >
    code = LATEST
    catImageMode = 0
    catTextMode = 1
    listOrderBy = title asc
    listGroupBy = category
  }

 

title_stdWrap

->stdWrap

stdWrap for display of the title field.

 

author_stdWrap

->stdWrap

stdWrap for display of the author field.

 

email_stdWrap

->stdWrap

stdWrap for display of the email field.

 

subheader_stdWrap

->stdWrap

stdWrap for display of the news subheader (short).

 

Example:

  plugin.tt_news.displayList.subheader_stdWrap {
    crop = 300 | ... | 1
    ifEmpty.field = bodytext
  }

This will crop the subheader after 300 characters and add "..." at the end of the text. (the third parameter for cropping only at the end of a word, works only with TYPO3 >=3.7.0).
If the subheader field (short) is empty, the content of the bodytext field is taken instead.

subheader_stdWrap is only active if the subheader is filled to the template marker ###NEWS_SUBHEADER### and not for the register "newsSubheader". see section "Registers" in this manual for more information.

 

content_stdWrap

->stdWrap

stdWrap for display of the news content (field: bodytext).

 

keywords_stdWrap

->stdWrap

stdWrap for display of the news keywords. This wrap Is only active if the content of the field "keywords" is filled to the Template marker ###NEWS_KEYWORDS### and not for the register "newsKeywords". see section "Registers" in this manual for more information.

 

links_stdWrap

->stdWrap

stdWrap for the complete links section in the SINGLE view

 

linksHeader_stdWrap

->stdWrap

stdWrap for header of the links section.

 

linksItem_stdWrap

->stdWrap

stdWrap for a single link.

 

addInfo_stdWrap

->stdWrap

This stdWrap wraps the complete list of additional data. It is inserted if there is at least one of the following items present: related news, files, links or "related news by category".

 

useBidirectionalRelations

boolean

If you set a relation between two news-records and you enable this feature you'll see the relation in both records on the website. The relation back from the target-record to the source is inserted automatically. In the BE you won't see the relation.

 

Example:

  plugin.tt_news.useBidirectionalRelations = 1

 

usePagesRelations

boolean

If you enable this feature you can assign pages as related news. Those "related pages" are handled as news with type set to "link to internal page" so no changes to the TS of the getRelatedCObject are needed.

 

related_stdWrap

->stdWrap

stdWrap for the list of related news.

 

relatedHeader_stdWrap

->stdWrap

stdWrap for the header of the "related news" section.

 

alwaysShowRelated

boolean

Enable this if you want to show related news in LIST or LATEST, too. In the default setup this option is disabled to make the listview render faster. To see the related news in LIST or LATEST you have to add the markers ###TEXT_RELATED### and ###NEWS_RELATED### to your template for the listview.

 

getRelatedCObject

COA /

->stdWrap

Configuration for the related links in "SINGLE" view.

The first case (10.default) configures the links to other news. The cases 10.1 and 10.2 configure the links to internal pages and external URLs (news types: article & external URL).
You can set an individal wrap for each type of related news.

The tmp object "tmp.5" is used to add an icon for each type of link
the "tmp.20" object is the datetime of the related item which is appended after the link.

Example:

  plugin.tt_news {
  ### Settings for Related News:
    related_stdWrap.wrap = <dl class="news-single-related">|</dl>
    relatedHeader_stdWrap.wrap = <dt>|</dt>

    # icon for related news
    tmp.5 = IMAGE
    tmp.5 {
      file = EXT:tt_news/ext_icon.gif
      file.width = 11
      file.height = 12
      wrap = | &nbsp;
    }

    # end-wrap for the getRelated objects
    tmp.20 = TEXT
    tmp.20 {
      field = datetime
      strftime = %d-%m-%y %H:%M
      wrap = &nbsp;-&nbsp; |
    }

    # Build the list of related news:
    getRelatedCObject = COA
    getRelatedCObject {
      # groupBy =
      orderBy = datetime desc

      10 = CASE
      10.key.field = type
      # settings for 'normal' related news
      10.default = COA
      10.default {
        wrap = <dd> | </dd>
        5 < plugin.tt_news.tmp.5
        10 = TEXT
        10.field = title
        10.typolink.parameter = {$plugin.tt_news.singlePid}
        10.typolink.additionalParams.data = register:newsAddParams
        10.typolink.useCacheHash = 1
        20 < plugin.tt_news.tmp.20
      }
          # settings for related news, that point to internal pages
      10.1 = COA
      10.1 {
        wrap = <dd> | </dd>
        5 < plugin.tt_news.tmp.5
        5.file = EXT:tt_news/res/tt_news_article.gif
        10 = TEXT
        10.field = title
        10.typolink.parameter.field = page
        20 < plugin.tt_news.tmp.20
      }
      # settings for related news, that point to external URLs  
      10.2 = COA
      10.2 {
        wrap = <dd> | </dd>
        5 < plugin.tt_news.tmp.5
        5.file = EXT:tt_news/res/tt_news_exturl.gif
        10 = TEXT
        10.field = title
        10.typolink.parameter.field = ext_url
        20 < plugin.tt_news.tmp.20
      }
    }
  }

 

getRelatedCObject.orderBy

string

Add an "ORDER BY"-clause to the query that finds the related news.

 

Example:

  plugin.tt_news.getRelatedCObject.orderBy = title

 

getRelatedCObject.groupBy

string

Add an "GROUP BY"-clause to the query that finds the related news.

 

Example:

  plugin.tt_news.getRelatedCObject.groupBy = type

 

noNewsIdMsg_stdWrap

->stdWrap

stdWrap for the error message that is diplayed when a user enters the single-view page without the GET var &tx_ttnews[tt_news].

 

noNewsToListMsg_stdWrap

->stdWrap

stdWrap for the error message that appears if there are no new found to display in the list view.

 

Example:

  plugin.tt_news.noNewsToListMsg_stdWrap.wrap = <p>|</p>

 

substitutePagetitle

boolean

if this is set, the pagetitle and the title for the page that is indexed by the indexed_search are substituted with the title of the news article. (works only in the "SINGLE"-view).

 

Example:

  plugin.tt_news.substitutePagetitle = 1

 

showRelatedNewsByCategory

boolean

Enable this if you want that the SINGLE view shows a list of news articles with the same category as the current article.

If news with the same category are found, they will be rendered as LIST to the marker "###NEWS_RELATED_BY_CATEGORY###". By default the code LIST causes tt_news to render the content to the template  ###TEMPLATE_LIST### This can be changed to a userdefined template part which f.e contains only the titles of the records.

See section "Related news by category" for an example.

 

SINGLE view with pagebreaks

Property:

Data type:

Description:

Default:

useMultiPageSingleView

boolean

This enables pagebreaks for the SINGLE view or is enabled automaticly when "maxWordsInSingleView" has a value. Pagebreaks are inserted after a certain amount of words or with the manually inserted "pageBreakToken"'.

 

Example:

This will enable pagebreaks for the single view if no value for "maxWordsInSingleView" exists.

  plugin.tt_news {
    useMultiPageSingleView = 1
  }

0