tt_news
NOT RENDERED: OFFICE:FORMS
Features:- 2 different html templates included: A table-based template which is kown from older tt_news versions and a new CSS-based template (see screenshots below).
- Supports export to the following XML-feed formats: RSS 0.91, RSS 2, RDF Atom 0.3 and Atom 1.0.
- Search-Form:
- Single View:
For news with type "normal news" the single view shows the full article with related news, links and - not in this image - attached files and "related news by category".
WARNING !! Do not install this tt_news version on TYPO3 prior to version 3.8.0 because it requires features that are not present in older TYPO3 versions. Don't even try it, because it might break your TYPO3 installation! Important: Deactivate all extensions that depend on a prior version of tt_news (<1.4.0)

Localization mode for text fields
By default, all text fields (text, subheader, imagecaption ...) from a new localized news article will be prepended with "[translate to ...]". If this is not wanted you can disable it here. Localization mode for images
The image field of a localized news article is excluded by default (images are alwas taken from the record in the default language). If you need localized images (f.e. if the images show texts) you can enable the "image" field in translated news by setting "l10n_mode_imageExclude" to 0. Hide new localizations
By default, all text fields (text, subheader, imagecaption ...) from a new localized news article will be prepended with "[translate to ...]". If this is not wanted you can disable it here. If "l10n_mode_prefixLangTitle" is disabled the text "(copy [#])" will be added to the titles of this records unless "prependAtCopy" is disabled (see "prependAtCopy"). Prepend at copy Here you can disable adding of the text "(copy [#])" to titles of copied records.
- case 1: If you upgrade from the "classic" 1.0.4 version without any other news-extension installed, you can use the updater and all should be ok. :-)
- case 2: if you upgrade from a tt_news version 1.0.x with one of the news-extensions installed that provides the "multiple categories"-feature, the updater will only update the content elements to flexforms but won't touch the category relation-table because its already present.
*** Important Note ***
There is one major change between tt_news 2.x and older tt_news versions: In tt_news 2.x the default TS-template is not included automatically. That means, if you don't include the TS-template as shown in the screenshot below, the plugin will do nothing. The TS-settings are splitted in 4 different parts now which you should be included with the "Include static (from extensions)" feature. The big advantage of this technique is, that the extension is not included in all TypoScript setups from your site by default. You can now choose if you want to include only the basic setup or to include the CSS-based setup, the default CSS-Styles and the RSS-feed feature.
- News-feed (RSS 0.91, RSS 2 , RDF, Atom 0.3, Atom 1.0): Include these settings if you want to enable XML feeds from your page.
| CATMENU | |
| VERSION_PREVIEW |
f this page is on the first level of the pagetree all pages below this page will also display tt_news as USER_INT object which consumes much more processing power than a USER object which can be cached. This can be prevented by using the 'template on next level' feature to set tt_news again to USER. Category selection:

| Do NOT show items with selected categories (AND) | |
| Do NOT show items with selected categories (OR) |
If you have your news not stored in a few dedicated sysfolders but scattered around in a huge pagetree it might be helpful to disable the pid_list/recursive functionality completely (see: "dontUsePidList"). Reason: TYPO3 checks each page in the pid_list for visibility and if the current FE user is allowed to see this page. When you have a very long pid_list which is generated from a whole pagetree this will take quite a lot processing power. Sheet: Template In the sheet Template, you can overwrite the html-template defined globally by TypoScript with another one. It is not required to define a template in this place, because in most cases several news content-elements under one pagetree use the same html-template. This can be defined directly in the TS-setup or in the Constant-Editor of your main-(TS)template. Hint
The best way to include your own html-template is to link it directly in TS. Add the following line by hand to your TypoScript setup or edit the default value in the "TypoScript Object Browser": plugin.tt_news.templateFile = fileadmin/templates/tt_news_template.html You can change the news display, by simply creating a new template-file for the display of news. There are 2 default template-files included in tt_news (in the folder EXT:tt_news/pi/):
- tt_news_v2_template.html: the new css-based html-template.
- news_template.tmpl: the table-based template.
- TypoScript still plays a big role in configuration for processing parts of the output (f.e.:"age_stdWrap") or for inserting all kinds of conditional wraps (see: "getRelatedCobj" for an example)
| Act as link to category shortcut | |
| Act as category selector |
| Max number of categorys texts |
| News | ||
|---|---|---|
| Link External page | ||
| These news records are also showing only in list views. The target for these links is configured globally in the Constant editor (advanced->target for internal links) |

- nestedWraps: This mode will render a category menu where each level has its onwn wrap.
| News 1 | ||
| News 2 | ||
| News 3 | ||
| News 4 | ||
| News 4a | ||
| News 5 |
| AMENU | LIST | LATEST | LIST | ||||
| No special settings required | ||
| No special settings required | Required Settings: Optional: } | |
| Example: | Required Settings: All (red-marked) links will point to the page id=132. This is the page which contains the news "SINGLE" content element (also known as: singlePid). } | Required Settings: All (red-marked) links will point to the page id=465 and will open it in the frame that is configured as target for internal links from constants (e.g.: PAGE_TARGET = page). } |
Category Shortcut Example: } | No special settings required | Required Settings: For category shortcuts that point not to the same frame in which they are displayed, it is required to define the target in the "news category" db record: |
Catselector Example: } | No special settings required | Required Settings:
If the catselector links should point to the current frame, there is no special setting required.
If the catselector links should point to another frame, add this to your TS setup: } with this setting the catselector links point to page id=78 in the frame named "page". |
Archive Link | Required Settings: plugin.tt_news { } | |
| Pagebrowser links (not in the graphic) | No special settings required. The pagebrowser links in "LIST" view will point to the global "PAGE_TARGET" if one is defined in the constants. | |
Links to "related news" | ||
Links to Files | ||
News Links | Hint: | |
Back-Link | (see -> backPid) | |
Image Link in Single view | ||
| Search page id (not in the graphic) | ||
- This will enable the use of "allowed categories" and adds the categories with uids 23,43,12 to this list (see section "Categories" for mre information)
- This will exclude the categories with uids 1,2,3 from showing in the category tree in BE-forms:
- This will show only the categories with uids 4,5,6 in the category tree in BE-forms:
- This will add a "Save & New" button to news and news-categories BE-forms
news_files;;;;4-4-4'), # RTE mode in table "tt_news" } }
| content(default) | Installed | } |
| content(default) | Not installed, or pageTS config not added by default. | } |
| css_styled_content | Installed |
| pi/tt_news_v2_template.html | The new CSS based html-template |
| res/tt_news_v2_styles.css | CSS styles for the new HTML template.(this file contains the same style information as the static ext-template "default CSS-styles") |
| res/rss_0_91.tmpl res/rss_2.tmpl res/atom_0_3.tmpl res/atom_1_0.tmpl res/rdf.tmpl | The xml templates for web feeds as RSS 0.91, RSS 2, RDF, Atom 0.3 and Atom 1.0. |
| res/realurl_localconf.txt | Example Configuration for tt_news with RealUrl |
| Example: } | |||
| Example: # clear the value # display news records located in page 582 & 584 | |||
| Example: plugin.tt_news.dontUsePidList = 1 | |||
| Example: | |||
Example: | |||
| # singlePid for a news element inserted by TS | |||
| Example: | |||
| (array of strings) | 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: |
| Example: useHRDatesSingle = 1 useHRDatesSingleWithoutDay = 1 } | |||
| 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 = _blank } | |||
| 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 { } |
| -> stdWrap | Example: | ||
| The maximum number of pages that are shown in the pagebrowser | |||
| Here you can choose if the pagebrowser should show texts like "page 1, page..." in the pagelinks or if it should show only numbers. | |||
| plugin.tt_news { } | |||
| Example: } | |||
| 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. | |||
| Note: | |||
| emptyArchListAtStart | |||
| Example: plugin.tt_news.archiveMode = month | |||
| archiveEmptyMsg_stdWrap |
| Example: } | |||
| listStartId | [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: plugin.tt_news { } | ||
| excludeAlreadyDisplayedNews | |||
| Example: Hint: | |||
| Example: } | |||
| Example: } | |||
| addInfo_stdWrap | |||
| useBidirectionalRelations | Example: | ||
| usePagesRelations | |||
| Example: plugin.tt_news { ### Settings for Related News: # icon for related news # end-wrap for the getRelated objects # Build the list of related news: # groupBy = # settings for 'normal' related news 10.typolink.useCacheHash = 1 # settings for related news, that point to internal pages # settings for related news, that point to external URLs } | |||
| Example: | |||
| Example: | |||
| 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. |
| useMultiPageSingleView | Example: plugin.tt_news { } | ||
| pageBreakToken | This will overwrite the default pagebreak token (<---newpage--->) with a different string. Example: plugin.tt_news { } | <---newpage---> | |
| maxWordsInSingleView | Insert pagebreaks automatically after a given amount of words. Can be configured globally or for a single content element. This can be disabled for news records individually by setting "no automatic pagebreaks for this record" . | ||
| useParagraphAsPagebreak | Here you can configure that pagebreaks will be inserted after a paragraph (an empty line in the bodytext field after pressing enter) instead of inserting them after the first dot after "maxWordsInSingleView" was reached. | ||
| singleViewPointerName | If you want to change the name of the GETvar that is used for the pointer of the pagebrowser in SINGLE view, it's possible to set this name here. Example: plugin.tt_news { } | sViewPointer | |
| subheaderOnAllSViewPages | By default the subheader is only displayed on the first page of a multipage SINGLE view. If this is not wanted the subheader can be configured to appear on all those pages by setting "subheaderOnAllSViewPages" to 1. | 0 | |
| appendSViewPBtoContent | The pagebrowser for the SINGLE view can be inserted into the content in two different ways: 1. There is a separate marker for the pagebrowser in SINGLE view: ###NEWS_SINGLE_PAGEBROWSER### 2. Alternatively it is possible to simply append the pagebrowser to the bodytext (###NEWS_CONTENT###) without using a special marker by setting "appendSViewPBtoContent" to 1. Example: plugin.tt_news { } | 0 |
| Example: This will supress images in list view. | |||
| Example: } | |||
| Example: This will render an image with the text "No image" on it in the LIST view: plugin.tt_news.displayList.image.noImage_stdWrap { } | |||
| Example: | |||
| Example: (default configuration) plugin.tt_news { } | |||
| Example: plugin.tt_news.displayList { } This will display the date in news LIST content elements like this: "Sunday 15. of August 2004". | |||
| Example: plugin.tt_news.displaySingle { } This will display the time in news SINGLE content elements like this: "12:03". | |||
| age_stdWrap | Example:
This will change the output of the age in the SINGLE view to german names: } | ||
| textNewsAge_stdWrap |
| useSubCategories | |||
| displaySubCategories | Example: } | ||
| catExcludeList | |||
| Example: # this will only show items with category 2 or 3 # show only selected categories } } | |||
| catImageMode | |||
| catTextMode | |||
| category_stdWrap | |||
| categoryTitles_stdWrap | |||
| categoryImages_stdWrap | |||
| categoryTitleItem_stdWrap | |||
| subCategoryTitleItem_stdWrap | Example: } | ||
| categoryImgItem_stdWrap | |||
| subCategoryImgItem_stdWrap | |||
| catImageMaxWidth | 20 | ||
| catImageMaxHeight | 20 | ||
| catTextLength | Note: This var makes only sense, when using the catTextMode 1 (= display but don't link). If the category title is linked, the chars of the html code are counted also and the cropping causes broken HTML. | ||
| maxCatImages | |||
| maxCatTexts | |||
| Example: # this will order the categories in news articles and in the CATMENU alphabetically } Example 2: plugin.tt_news { # order categories in LIST by uid # order categories in SINGLE and CATMENU by title } Note: | |||
| Example: # This is the default setup } |
| mode | |||
| excludeList | |||
| includeList | Example: | ||
| catmenuIconMode | |||
| catmenuIconPath | |||
| catmenuIconFile | Example: plugin.tt_news { } | ||
| insertDescrAsTitle | |||
| catmenuNoRootIcon | |||
| catmenuRootIconFile | |||
| catmenu_stdWrap | Example: plugin.tt_news { } | ||
| catmenuHeader_stdWrap | Example: plugin.tt_news { } | ||
| catmenuItem_ACT_stdWrap | Example: } | ||
| catmenuItem_NO_stdWrap | |||
| catmenuLevel[#]_stdWrap | Example: } |
| showCatRootline | |||
| catRootline_stdWrap | Example: # settings for the category rootline showCatRootline = 1 # if titles are linked the link points to the page which is configured as category shortcut } | ||
| linkTitles | |||
| title_stdWrap | |||
| divider |
| rss091_tmplFile | resource | XML template for RSS 0.91 feed | |
| rss2_tmplFile | resource | XML template for RSS 2.0 feed | |
| atom03_tmplFile | resource | XML template for Atom 0.3 feed | |
| atom1_tmplFile | resource | XML template for Atom 1.0 feed | |
| rdf_tmplFile | resource | XML template for RDF feed | |
| xmlFormat | string | Defines the format of the news feed. Possible values are: rss091, rss2, rdf, atom03 and atom1 | |
| xmlTitle | string | The title of your news feed. (required for rss091, rss2, rdf, atom03, atom1) | |
| xmlLink | string | The link to your hompage. (required for rss091, rss2, rdf, atom03, recommended for atom1) | |
| xmlDesc | string | The description of your news feed. (required for rss091, rss2, rdf, optional for atom03, optional for atom1) | |
| xmlLang | string | (required for rss091, optional for rss2, recommended for atom03, not available for rdf and atom1) | |
| xmlIcon | string | Provide an icon for your news feed with preferred size of 16x16 px, can be gif, jpeg or png. (required for rss091, optional for rss2 and rdf, not available for atom03 and atom1) Example: plugin.tt_news.displayXML { } | |
| xmlCopyright | string | Copyright notice for content in the channel. Maximum length is 100 (optional for rss091, rss2, atom03, atom1, not available for rdf) | |
| xmlManagingEditor | string | The email address of the managing editor of the channel, the person to contact for editorial inquiries. Maximum length is 100. (optional for rss091, rss2, not available for rdf, atom03 and atom1) | |
| xmlWebMaster | string | The email address of the webmaster for the channel, the person to contact if there are technical problems. Maximum length is 100. (optional for rss091, rss2, not available for rdf, atom03 and atom1) | |
| xmlLastBuildDate | boolean | The last time the content of the channel changed. (when the latest news was added) (optional for rss091, rss2, required for atom03 and atom1, not available for rdf) | |
| xmlLimit | int+ | Limit for news records in the RSS/XML feed Example: } | 10 |
| xmlCaching | boolean | Allow caching for the RSS/XML feed | 1 |
| dontInsertSiteUrl | boolean | If set, the links in the XML feeds are not preprended with the siteUrl. | |
| xmlDeclaration | string | Example: } |
| sys_language_mode | string | Example: | |
| showNewsWithoutDefaultTranslation | boolean | ||
| showLangLabels | Example: } | ||
| showFlags | |||
| flagPath | |||
| flagImage |
| defaultCode |
Example:
This will render records in the "insert records" content element with the LIST template (default is: SINGLE_RECORD_INSERT). | ||
| displayCurrentRecord | |||
| itemMarkerArrayFunc | |||
| newsAmenuUserFunc | |||
| imageMarkerFunc | |||
| userPageBrowserFunc | |||
| _LOCAL_LANG | ###SPAN_BEGIN###%s bis %s</span> von ###SPAN_BEGIN###
%s</span>
} } | ||
| Example: /* example styles for the pagebrowser*/ .tx-ttnews-browsebox TD { font-size: 10px; } .tx-ttnews-browsebox-strong, .tx-ttnews-browsebox-SCell { font-weight: bold; } .tx-ttnews-browsebox-SCell { background-color: #EEE; } |
### News LATEST in left column } # add tmp to page Object
### SINGLE news with graphical header } [depreciated] Since tt_news 2.2.0 the category selector is a normal content element: CATMENU. So take this as a general TS example ? maybe useful for other purposes. ### news Category Selector # the category folder(s) } # hide the "no news id" message # set the tt_news singlePid to the current page # fill the content of the main-column to a tmp.object # clear the content of the main column # build a new object for this column as content-object-array # insert the pids of all pages from where you want to fetch news. # the recursive-field has no influence on this selection # insert the object "10." only if there is no SINGLE news selected # re-insert the normal pagecontent to the page } # clear the code field # prevent indexing of the LIST view config.index_enable = 0
[globalVar = GP:tx_ttnews|tt_news > 0] # enable indexing of the SINGLE view # load tt_news as content to the page object } # This will remove the <p class="bodytext"> wrap from subheader, author and links # unset general_stdWrap # add a wrap to the subheader # add parseFunc to the subheader # prevent adding of <p> tags # add parseFunc to the bodytext # add parseFunc to the links field # prevent adding of <p> tags }
If you use TYPO3 3.6.2, tt_news will work as known, because the localization features will be disabled if no TYPO3 3.7.0 or higher is found. To integrate tt_news in a multilanguage site, follow the steps described below. Open the sysfolder where your news are located (in web/list view) and create an "Alternative Page Language" for each desired translation.

Now activate the "localization view":

If you assigned flag-images to your website languages you should see something like this in your browser:

Click on a flag icon (or the language label) to "localize" a news db-record in a certain language. Now the flag-icon is moved to the "localization" column to show that this news record is translated. Hint:
If you don't want the localized news records to be immediately visible on the website you can enable "Hide new translations" in the extension configuration (see section "Installation").

The titles of the news records had been prepended with "[Translate to {language_label}]". Language = all if you set the language in a news record to "all" ths record will be displayed in all available languages.
Now let's see what else changed in a "localized" news article:


You see, that some fields are "missing" in the translated version. Those fields are taken from to the original-language (f.e.: type, related news). Categories are always copied from the record in the default language. The localized article shows only which categories are assigned they are not editable in translations. If the record has categories assigned that are not in the list of allowsed categories for the current BE user a warning message will be displayed and saving of the article will be disabled (see section "Categories" for more information). All fields are showing the value of their original-language below the input field. Sys_language_mode With the TS-var "sys_language_mode", you can configure the handling of not translated news-articles. The default is to display the article in the default language if there is no translation was found. If you don't want this behaviour you can set "sys_language_mode" to strict Let's say you have 10 news articles in your site (in the default language) and 5 of them are translated to the selected language. In the default "sys_language_mode" a news list will display 10 items. With "sys_language_mode=strict" the same list will show only 5 news articles. The example language-menu (/media/scripts/example_languageMenu.php) coming with older TYPO3 packages ("testsite" package) does not support the tt_news GETvars (the parameters in the Adressbar). The HMENU type=language (new in TYPO3 3.7.0) does exactly the same. I included a new version of this script in the tt_news distribution. See file: EXT:tt_news/res/tt_news_languageMenu.php
This version keeps the link vars from tt_news (and other extensions) and it also works with simulateStaticDocuments and RealUrl. You can also use the extension: "sr_language_menu" to switch your website's languages. This extension keeps also the linkVars from tt_news. To enable your site for serving news as XML-feed, add the static ext-template "News-feed (RSS 0.91, RSS 2 , RDF, Atom 0.3, Atom 1.0)" to your TypoScript setup. This adds a new page-type (100) and configures tt_news with the code "XML", if a page with type=100 is requested. the other settings for XML feeds can be configured in the constant editor or directly in your TypoScript setup.

| xmlTitle | r | ||||
| xmlLink | o | ||||
| xmlDesc | o | ||||
| xmlLang | n/a | ||||
| xmlIcon | n/a |
atom1feed = PAGE
atom1feed < xmlnews atom1feed {
10.displayXML.xmlFormat = atom1
typeNum = 103
} <link rel="alternate" type="application/rss+xml" title="RSS-Feed" More information:
- "direct preview" with the save&preview button doesn't work in editforms of non-public versions of news articles -> use normal "version preview" instead.
- "direct preview" works only in the "Live" workspace.
- extend the "web/page" BackEnd-module to work with localized news.
- New feature: category trees in BE are expandable and collapsible now (requires xajax)
- New feature: added a new backend module called "tt_news category manager" (Requires TYPO3 4.0). This module is located under web/info. It shows the complete category tree - of course expandable and collapsable - and offers drag and drop for moving and copying news categories. Thank goes to: CNV (Christelijk Nationaal Vakverbond) for sponsoring this feature.
- New feature: "Exclude already displayed news". The new TS option "excludeAlreadyDisplayedNews" allows you to place multiple news plugins on one page where the 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.
- New feature: added the category tree to be_users and be_groups records. Now it is possible to select the allowed and visible categories for a certain be_user/group with the category tree. If categories are selected in the be_user/group records the TSconfig settings 'options.useListOfAllowedItems', 'tt_newsPerms.tt_news_cat.includeList' and 'tt_newsPerms.tt_news_cat.allowedItems' have no effect anymore. (thanks to netcreators.nl for sponsoring this feature)
- Many bugfixes and other small improvements.
- see the complete changelog here: http://svn.sourceforge.net/viewvc/typo3xdev/tx_ttnews/trunk/ChangeLog?view=markup
- New feature: added two new category modes:
2 = select only news which have all the selected categories assigned (AND)
-2 = show only news which have none of the selected categories assigned (OR)
thank goes to Reto Schmid/.hausformat for sponsoring this feature
- New feature: Support for workspaces in TYPO3 4.0 (Thanks to netcreators.nl for sponsoring this).
- New feature: Support for ATOM 1.0 feeds
- New feature: new template marker ###NEWS_CATEGORY_ROOTLINE###. This marker will be filled with the titles of the parent categories of the first assigned category in SINGLE view or with the parents of the selected category in LIST view. See section "The category rootline" for details.
- New feature: Added the possibility to exclude (or include) categories for certain users in BE forms.
- New feature: Added the possibility to exclude (or include) categories in the FrontEnd category menu.
- Many bugfixes and other small improvements. See Changelog for details.
- merged in new translations