All page names need to be in English.
en da  de  fr  it  ja  km  nl  ru  zh

Tt news

From TYPO3Wiki
Jump to: navigation, search

<< Back to Extension manuals page




What does it do?

Extension for displaying news.


  • 3 types of news items: standard news articles, external links and links pointing to internal pages
  • Automatic archiving (after a given number of days has passed, news are automatically in the archive, no need to set an archivedate manually)
  • Search function
  • Widely configurable news content element.
  • Main options are configurable with Typoscript and FlexForms
  • News-categories, that can be assigned to news items (multiple selections possible).
  • Category-Images and Links. Category-images and names can act as link to a specific page or act as category Selector.
  • Search function (can be combined with the cat selector function to filter results by categories)
  • Supports caching and indexing


  • Latest & List View: News plugin in a two column design showing LATEST template in the left column and LIST template in the normal column.
TT News screenshot latestlist.jpg
  • Archive-Menu (AMENU) and empty Archive-Menu:
TT News screenshot amenu.png
  • Search Form:
TT news screenshot search.png
  • Single View:
TT News screenshot single.jpg

Users manual


Q: is the single view page required?

A: yes, since tt_news 1.3.0 it isn't possible see the single view on the f.e. list page when no singlePid was defined.

Q: What does this error message mean: "Attempt to insert record on page '[root-level]' (0) where this table, tt_news_cat, is not allowed"?

A: It means that you haven't defined a "General Records Storage page" (-> see next question) and so TYPO3 tries to create the new news-category in the rootpage (page id=0).

Q: what is the "General Records Storage page" and where do I have to set it?

A: If you set "use StoragePid" in the extension manager, the "General Records Storage page" points to the page where to look for categories that are displayed in forms in the BackEnd. This setting determines also the page where new category records are created if you use the "+" icon from the news article form to create them. (The General Records Storage page is set in the page header.)


if you have a pagetree like shown in the screenshot below, the only page, where you have to set the "General Record Storage page", is the one named "tt_news example 1". All pages below this page will take this setting if it is not overwritten by setting this value in another page.

TT News generalRecordStoragePage1.png

If your page structure requires, that the news folder(s) are not located under one pagetree, you have to set the 'General Records Storage page' for each news sysfolder and the rootpage of your site:

TT News generalRecordStoragePage2.png




Official documentation:

See also main article: Tt news/configuration


If the news extension doesn't display anything (not even an error message) check the following:

  • did you set a static template (from Extensions) in your TS-template?
  • is the header of the content element displayed on the website? If this is the case then the news content element seems to be configured correctly
  • Are there any news records in the folder where the "Starting point" field points to?
  • Did you unhide the news records before saving them.
  • If you typed the path to the html-template directly in the TS setup-field: is the html-template located in the correct path? (path is case sensitive)
  • Enable the admin panel (config.adminPanel=1) in your TS setup and look for error messages in the “TypoScript” section: (to see the possible TS errors set the checkboxes as shown in the screen shot below)

Tt news 3890b644.png

  • clear all TYPO3 caches, clear your Browser cache.
  • if you use different domain for administration (backend) and for pages itself you might encounter the same problem as me - the plugin does not show anything. Edit it using the same domain and it will work

New added TS configurations:

latestWithPagebrowser - to exclude the LATEST template from changing its content with the pagebrowser

defaultCode - specify the defaultCode to use (for insert record and if no FlexForm value is given)

reverseAMenu - the order of the items in amenu can now be reversed

noNewsIdMsg - By setting this in your TS you can override the message 'Wrong parameters, GET/POST....' with your own message

itemLinkTarget - Target to use for the link in newsitems (usefull for frames)

pageBrowser - Object for configure the page browser (see above)

getRelatedCObject.useInternLinkGeneration - Hack for the related News, so that it is possible to make the links with the internal link function of tt_news. (See above) (eg. this is recommended if you use FlexForm for the configuration of SinglePID)

Template (Markers and Subparts)

Subparts and the markers which are available: This List is an overview of the new Markers. Special the ones which are filled with languagevars, new ones and the one which could be configured with stdWrap (TS) are listed here:


Subpart ###TEMPLATE_SEARCH### (with the Markers ###FORM_URL### ; ###SWORDS### )

Subparts ###TEMPLATE_LATEST### and ###TEMPLATE_LIST###

 Markers which were substitute with Languagevars (or some languagevars are added to the output)

Common Markers for the Subparts ###TEMPLATE_SINGLE###, ###TEMPLATE_LATEST### and ###TEMPLATE_LIST###:

Markers which were substitute with Languagevars (or some languagevars are added to the output):
###TEXT_LINKS### (Also the output could be configured with TS: newsLinksHeader_stdWrap)
###TEXT_RELATED### (TS: relatedHeader_stdWrap)
Some normal Markers:
###PAGE_AUTHOR### (TS: author_stdWrap)
###PAGE_AUTHOR_EMAIL### (TS: email_stdWrap)

subpart ###TEMPLATE_ARCHIVE###

Markers which were substitute with Languagevars (or some languagevars are added to the output):
###ARCHIVE_HEADER###  (TS: archiveHeader_stdWrap)
###ARCHIVE_EMPTY_MSG### (TS: archiveEmptyMsg_stdWrap)


subpart ###ITEM_SEARCH_EMPTY###

Marker ###SEARCH_EMPTY_MSG### (TS: searchEmptyMsg_stdWrap)


Customizing tt_news file download links

Suppose you want to intercept tt_news file download links so you can enforce a user registration policy. Have a look at EXT:tt_news/res/example_itemMarkerArrayFunc.php. Be careful what you name your own function, it *must* start with a prefix of "user_" If you don't, then the whole thing silently ignores your code.

Extending tt_news

There are several possibilities to extend/change the functionality of tt_news without building a new extension.

  • "newsAmenuUserFunc": for processing the archive menu -> see example in folder res/
  • itemMarkerArrayFunc: for processing the complete marker array -> see example in folder res/
  • you can define different template parts with: "altMainMarkers" -> see example in "Reference" above.
  • there are two function-"hooks" in the tt_news-class (in function main_news() & function getItemMarkerArray()). For more information about hooks see: [1]


Karsten Hachmeister has written a tutorial on how to add news to your page.

Beware: this is for an old version of tt_news.

Known problems

  • not really a news problem: when you add the example_language_menu.php to your site and you switch languages in the single view, you'll get an error message, because the GET var &tt_news= is ignored by this script.
  • if an AMENU element is shown in a (border-)frame and the LIST in the (page-)frame, then the links will not work because the target is not written to the html tag.

To-Do list

  • Language overlays / Language relations
  • RSS/XML feed import thats is autoupdating and saves the feeds date as publishing date


see changes/fixes done in cvs-project since v1.4.0: Talk:Ext_tt_news

changes in tt_news v1.4.0

  • fix for bug ID 0000212: category names and images are now also displayed in single view
  • fixed some problems with category link mode 3 (act as cat selector). The 'selectDeselectCategories' value works now also from TS. This makes it possible to show a LIST element, which changes its content with the cat selector and a LATEST element (inserted by TS) that is not influenced by this selection on the same page.
  • fix for Bug id 0000185: Errors by using tx_ttnews without a prior installation of tt_news
  • fix for bug ID 0000226: now the AMENU works with frames
  • added a new TSvar: 'emptyArchListAtStart'. When entering the archive listing the first time and this value is not set (default), the archive listing shows all archive items starting from today minus datetimeDaysToArchive. You can set this var if you want the old behavior which shows nothing when no parameters are given. (related to bug id 0000229).
  • changed wrapping for bodytext and news-links (now links in bodytext and news-links are processed only once). There are some open questions in the lists that have to do with the wrapping/rte-transforming of links, breaks, tables ... hope some of them will disappear ;-) -> this fixes also bug ID 0000175 (still a problem with lists from rte)
  • added 'allowTableOnStandardPages' for tt_news_cat
  • changed tca.php and flexform_ds.xml to find categories only in the 'storage pid'. This makes it possible to use more than one folder with news records and categories where each news record only shows the categories from its own category folder.
  • changed the values for the categoryModes. (old values was 1,2,3 new values are -1,0,1)
  • extended the constant editor with more of the basic configuration options
  • 'news title' will be set as page title in the single view
  • included the fixes for indexed search and caching from Karsten Hachmeister
  • rearranged the FlexForm Sheets of the tt_news content element
  • moved the fields 'starting point' and 'recursive' to FF
  • cleaned up the html-template, added alternating templateparts removed font tages...
  • added a 3rd wrap, eg. for the amenu header
  • added a 4th global color used by the list view
  • removed the maxCatText lenght cropping from FF (cause its only working in linkMode1 in the other link modes it causes broken html)
  • added a getLL var for the 'age' prefix
  • added comments
  • new help image
  • changed the order of the archiveMode options in FF -> now '0' (don't care) is the default.
  • updated the updater with the new FF fields
  • extended and revised manual

changes in tt_news 1.3.0:

  • getLL language functionality for the html template. To make this work you'll have to remove all texts like: 'prev','next'... from tt_news template (an updated template is included with the new version).
  • stdwraps for all text from the getLL function
  • single view don't override LATEST or LIST view anymore.
  • the LATEST template don't change its contents with the list view by clicking links in the pagebrowser or in the archive menu
  • the ordering of AMENU elements can now reversed by setting the TSvar 'reverseAMenu' (which is set by default now)
  • the TS var 'code=' is integrated again.
  • the uploadfolder for templates is now created at installation if it doesn't exist yet
  • you can now use the filetypes 'tmpl' and 'html' for templates uploaded by FF or in the constant editor
  • removed the field 'recursive' from FF in content element
  • Hooks added for extra views and item markers.
  • added 'allowTableOnStandardPages' for tt_news_cat -> this is more logically and keeps the FAQ smaller.
  • restructured the code in main class, added comments, code beautifying.
  • more possibilities to display the news_articles in the 'insert records' content element. by setting the TS var 'defaultCode' you can now choose between 'SINGLE', 'LIST' or your own template.


changes in tt_news 1.2.3:

  • New features known from News+, News Category Image and News Multiple Categories.
  • Added support for multiple categories, category images and shortcuts, RTE and more. Credits goes out to Andreas Schwarzkopf, Carsten Horst and Ingmar Schlecht.
  • Flexforms added.
  • Updater added for category table and CODE-filed(select_key) to FlexForms.