Wednesday, August 30, 2006

Monster Energy Corsette

BUGFIX: tt_news single limiting view pid_list on

The following problem was there with me today: A Typo3 (4.0.1) project has two independent trees. Let's call the first "Internet" and the Second "extranet". Both trees each have a sys_folder that contain only news items (tt_news 2.4.0). The article "Extranet" so have a different PID than those from the "Internet" tree. In the template I have TypoScript Constants written under the following words:
# Internet TS template plugin.tt_news.pid_list = 19 # TS Extranet Template plugin.tt_news.pid_list = 90 This also has everything in the LIST or LATEST view Trademarks. In testing, I eventually realized that it is possible in the "Internet" tree in the SINGLE view of the manipulation of tx_ttnews [tt_news] variables also read the articles from the extranet. The "Internet" tree was nowhere PID 90 (ie the UID of the Extranet sys_folder tree) indicated.
To fix this, you will simply do the following:
Opens class.tx_ttnews.php in an editor. Examines the definition of the function displaySingle () (such as line 510). This should then look something like this: function display single () {$ single
where = 'tt_news.uid ='. intval ($ this-> tt_news_uid); single $ where .= 'AND type NOT IN (1,2)'.
$ this-> enableFields / / only real news -> type = 0
$ where .= 'AND pid IN ('
$ this-> pid_list '.. ) ';
 and lo and behold - the SINGLE view has suddenly also on your TypoScript. 


0 comments:

Post a Comment