There are several kinds of links in a news record. The table below gives you an overview which parameters will affect which link. In the graphic you see the possible links in a news “LATEST” element. The links in the “LIST” elements work exactly like those in “LATEST” elements. The links in the “AMENU” are configured with the same parameters as the “Archive Link” (4). The Links in the “SINGLE” view are explained after this.
Link Description: | Link-Configuration: | Link-Configuration in Framesets: |
|---|---|---|
| No special settings required External links will use the target, given in the link-field in the news-record. If there is no target given they will use the global target for external links.Example: This will open typo3.org in the same window:
| |
| No special settings required | Required Settings: The global target for all links has to be defined in your main template (e.g.: PAGE_TARGET = page). Optional: If you want the news links to internal pages point to another frame, you can override the global target with this setting.
plugin.tt_news {pageTypoLink.target = _top } |
These links are inserted to the HTML template by the ###LINK_ITEM### markers. Example: <!--###LINK_ITEM###--> ###NEWS_IMAGE### <!--###LINK_ITEM###--> | 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). plugin.tt_news {singlePid = 132 } | 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). plugin.tt_news {singlePid = 465 } |
Category link: Type “shortcut” This link points to a page in the same pagetree. Example: plugin.tt_news {catImageMode = 2 } | 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:
|
Category link: Type “category-selector”This link will filter the displayed news or archivemenu-items by category. Example: plugin.tt_news {catTextMode = 3 } | 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: plugin.tt_news {itemLinkTarget = page catSelectorTargetPid = 78 } with this setting the catselector links point to page id=78 in the frame named “page”. |
- used in the “LATEST” element (example html-template) for the link that points to the page with the archive listing (marker: ###GOTOARCHIVE###)- and 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. | Required Settings: plugin.tt_news { archiveTypoLink.parameter = 34 } In the example the “Archive Link” in the LATEST element points to the page with id=34. This page contains an “AMENU” content-element. The links in the “AMENU” element are configured with the same settings, but those links expect a page with a “LIST” element as target. That page is configured to list only archived newsitems. If you set this value from the Contstant-Editor for all news content-elements, this “LIST” has to be on the same page as the “AMENU”. The target for this link is configured as the global PAGE_TARGET in constants. See section “The Archive” for more information about linking the “AMENU” to other news content elements or pages. | |
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 in the “SINGLE” view
Some of the link-types in the single view are configured with the same parameters as shown in the table above:
Links to internal pages (see -> getRelatedCObject)
Links to external URLs (see -> getRelatedCObject)
Category-links that point to category-shortcuts (2) (the catselector mode will not work - and does not make sense - in single view)
Link Description: | Link-Configuration: | Link-Configuration in Framesets: |
|---|---|---|
| No special settings required (see -> getRelatedCObject ) | |
| The links to files are configured with the “filelink” object. (see -> newsFiles) | |
| The news “Links” are parsed through the “general_stdWrap”. (see -> general_stdWrap) Hint: you can add “typolinks” to this field: <LINK http://mysite.com _blank>open mysite</LINK> This will open the linked site in a new browser window. The link will appear as “open mysite” in SINGLE view. | |
| This links points to the last “LIST” or “LATEST” view. Usually the page that linked to the “SINGLE” view. (see -> backPid) | |
| No special settings required, in the default configuration these links point to a javascript that opens the image in a pop-up window. (see -> imageWrapIfAny ) | |
Email link Text Links in news bodytext | No special settings required This links use the global settings for links | |
Search page id (not in the graphic) | If you want the search button in the “SEARCH” content element point to another page than the current you can define this page as “searchPid”. (see -> searchPid ) |
You can configure many options of the tt_news BE-form by editing the TSconfig field of the BE-user or the BE-Group this user is a member of.
Examples:
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)
options.useListOfAllowedItems = 1
tt_newsPerms.tt_news_cat.allowedItems = 35,36,37
This will exclude the categories with uids 1,2,3 from showing in the category tree in BE-forms:
tt_newsPerms.tt_news_cat.excludeList = 1,2,3
This will show only the categories with uids 4,5,6 in the category tree in BE-forms:
tt_newsPerms.tt_news_cat.includeList = 4,5,6
This will add a "Save & New" button to news and news-categories BE-forms
options.saveDocNew.tt_news = 1
options.saveDocNew.tt_news_cat = 1
This will remove the "Delete" button from the news categories form.
options.disableDelete.tt_news_cat = 1
This will set the field “hidden” in new created news articles to 0 (=visible)
TCAdefaults.tt_news.hidden = 0
If you click on the "TS" button in the right of the textarea you'll see all possible options in a pop-up window.
More information about “User TSconfig” can be found here: http://typo3.org/documentation/document-library/doc_core_tsconfig/OPTIONS/
Since tt_news 2.2.0 it's possible to open a news article in the SINGLE view when clicking the “save & preview” button in the news record in the BackEnd (works only in the “Live” workspace). The “singlePid” for the page who should open the SINGLE view has to be configured in the Page TSconfig of the folder with the news records. This page can be the normal SINGLE view page for your website it could also point to another page which contains a tt_news content element with code SINGLE.
Example
This will open the page with id 37 when clicking on the “save & preview” button in a news record:
tx_ttnews.singlePid = 37
If you, e.g. want to hide only certain options of some fields for BE-Users, you can do this by editing the Page-TSconfig of the folder where your tt_news db-records are stored. (these settings will affect all BE users including those with admin rights)
Example
This will remove the option "external Url" (type=2) from the "type" field in the tt_news db-record:
TCEFORM.tt_news.type.removeItems = 2
I recommend to use the extension “htmlarea RTE” (extkey: rtehtmlarea) instead of the RTE (extkey: rte) which is included in your TYPO3 package. One big advantage of rtehtmlarea is, that it works on almost all browsers and operating systems. The classic RTE works only in Internet Explorer because it depends on some ActiveX-controls which are (fortenutely) not available in other browsers.
Since tt_news v1.4.2 the RichText-Editor for news is configured like the RTE for normal content (e.g. Text, Text w/image). This is done at three places:
1. By this line in tca.php:
[line: 405]
'0' => Array('showitem' => 'title,type;;1;;,datetime;;2;;1-1-1,author;;3;;,short,bodytext;;4;
richtext[paste|bold|italic|underline|formatblock|class|left|center|right|orderedlist|unorderedlist|
outdent|indent|link|table|image]:rte_transform[flag=rte_enabled|mode=ts];4-4-4,no_auto_pb,
--div--;Relations,category,image;;;;1-1-1,imagecaption;;5;;,links;;;;2-2-2,related;;;;3-3-3,news_files;;;;4-4-4'),
which confgures which buttons or features will be available in the RTE-interface and it sets also the basic “transformation mode” (mode=ts). The transformation mode defines how the content of the field is changed while storing it in the database and while getting it back from the database. A nice graphic that shows how and where transformations work, can be found on this page: http://typo3.org/documentation/document-library/doc_core_api/Process_illustration/
2. If the extension “css_styled_content” is enabled, the transformation mode is changed to “ts_css” by adding this lines as “default pageTSconfig”:
# RTE mode in table "tt_news"
RTE.config.tt_news.bodytext.proc.overruleMode=ts_css
This mode enables the use of CSS-classes for formatting the contents of the news record (e.g. HTML-lists will be generated with tags like <ul>,<li> and <ol>, headers will be rendered as <h1> - <h6>... for a detailed view on the changes between the different transformation modes take a look at this page: http://typo3.org/documentation/document-library/doc_core_api/Transformation_overv/ )
3. The third part of the RTE configuration is done by this line in the file static/ts_new/setup.txt or static/ts_old/setup.txt in the extension dir (the settings in these files will be enabled by adding one of them as “static templates from extensions” to your TS template):
plugin.tt_news.general_stdWrap {parseFunc < tt_content.text.20.parseFunc
}
The “general_stdWrap” is used additionally to the normal standardWraps (f.e. subheader_stdWrap) for the following fields: “author”, “subheader”, “text” and “links”. That means, the processing of these fields can be changed by modifying one line of TypoScript. If this behaviour is not wanted for a certain site, it can be disabled by clearing the “parseFunc”:
plugin.tt_news.general_stdWrap {parseFunc >
}
But then you'll have to add a “parseFunc” to every field which contents should be processed (f.e. to find mailadresses in the text and add <a href=”mailto:...” to them).
“< tt_content.text.20.parseFunc” means, that the parseFunc-configuration from the field “text” from tt_content is also taken for the tt_news-fields which are processed by the “general_stdWrap”. If you want to change the configuration of “tt_content.text.20.parseFunc”, open this value in the “TypoScript Object Browser” (see screenshot at the begínning of the section “Reference”).
If you want to change the appearance of the RTE in BE forms, you can overwrite the default settings in “page TSconfig”. To see the current TSconfig settings for your site, you can use the tool: “View TS config fields content” from “Web>Info, page TSconfig”.
The RTE configuration can also be changed by “RTE.default” settings added by other extensions. If you have the extension “CSS_styled_content” installed, and you did not change the default setting: “Set PageTSconfig by default=on”, this value will overwrite the transform settings for tt_news given in tca.php (the codeline above).
The following table shows the pageTSconfig settings for the site, from the screenshot above (“RTE.default” means that in this site the RTE processing for tt_news is configured like the processing for tt_content). All settings are done in the page “tt_news example 1” (is root-page). The sysfolder for news is located under this page, so the settings from the “root-page” will also affect this folder.
Template settings | EXT:css_styled_content | Add to Page TS-config: |
|---|---|---|
content(default) | Installed | RTE.default { proc { preserveTables = 1 overruleMode = ts } } |
content(default) | Not installed, or pageTS config not added by default. | RTE.default { proc { preserveTables = 1 overruleMode = ts } showButtons = table } |
css_styled_content | Installed | no special settings needed. The “overrule mode” is added to the default pageTSconfig. |
Notice: If your news sysfolders are not located under your website's “root-page” you'll have to add the settings from the table above to the PageTSconfig of your news sysfolders.
Example:
The settings that start with “RTE.default” will affect the RTE for tt_news and tt_content (and all RTEs from other extensions). If you want to configure the RTE for tt_news different from the RTE for tt_content, the syntax looks like this (pageTSconfig):
RTE.config.tt_news.bodytext { proc { preserveTables = 1
overruleMode = ts_css
}
showButtons = textcolor,bgcolor
}
for further details see:
http://typo3.org/documentation/document-library/rtehtmlarea/
http://typo3.org/documentation/document-library/rte/
http://typo3.org/documentation/tips-tricks/customizing-the-rich-text-editor/
http://typo3.org/documentation/document-library/doc_core_api/Introduction-1841d1ad26/
The basics about the Rights & Permissions concepts of TYPO3 can be found in the "getting started" document: http://typo3.org/documentation/document-library/doc_tut_quickstart/Setting_up_user_perm/
for some advanced options see: http://typo3.org/documentation/document-library/doc_core_tsconfig/MOD/
Since version 1.4.0 tt_news supports caching and thus indexing by the indexed_search extension. Now the problem appears that you'll have to clear the cache for the e.g. “Homepage” to see the changes you made in a news article that is located in the news sysfolder.
This can be done automatically.
Example:
in the small pagetree below, the news articles are located in the sysfolder "News db Records". The page "Home"(647) shows a news LATEST content element in the left column and the page "News"(637) and its subpages show other news content elements.
If a user changes an item in the news sysfolder, the pages "Home" and "News" will still show the same content (assuming that caching is enabled).
If you add the following parameters to the PageTSconfig of the news sysfolder, the cache for the pages configured in the “clearCacheCmd” is automatically cleared by saving a news record in this folder.
TCEMAIN.clearCacheCmd = 647,637
for more options see: http://typo3.org/documentation/document-library/doc_core_tsconfig/MOD/