[TYPO3] tt_News Config and Template

Jared Phipps jared at MilPro.net
Mon Sep 15 04:48:02 CEST 2008



I am working on getting tt_news set up and running on the site. 

I was able to get it to show the 'list' view in the default green
template, but never able to get it to show an entire article (when I
clicked the {more} hyperlink it did nothing). That was based on the
tt_news manual. I then went and bought Mastering TypoScript by Daniel
Koch and followed his instructions based on page 253. 

I now have the following structure: 

Home
 - Interviews  {In context menu I put in News content, LIST item in
General Setteings under Plugin Options | Show Non-Archived}
    --News (system folder, News selected from Contains Plugin)
    --Archive Overview (hidden from menu) {Set up LIST and AMENU as
objects | Show Archived}
    --Archive (hidden from menu) {Set up AMENU | Show Archived}
    --Single View (hidden from menu) {SINGLE}
    --Search (search component installed) 

I then followed instructions on page 255 to run it with a separate
template. On the Interviews page I selected 'Click
here to create an
extension template' (book was not too clear on that part so hopefully
it was that, the other one said for root of a new site). I then put in
the following under that template: 

INCLUDES
css-based tmpl (tt_news) 

CONSTANTS
#The ID of the SysFolder Newspid_list = 15
#The ID of the SIngle Page
singlePID = 18
#The ID of the Archive Overview Page
archiveTypoLink = 16 

SETUP
plugin.tt_news.templateFile =
fileadmin/template/news/tt_news_template.tmpl
plugin.tt_news.pid_list >
plugin.tt_news.pid_list = {$pid_list}
plugin.tt_news.recursive >
plugin.tt_news.recursive = 1
plugin.tt_news.singlePid = {$singlePid}
plugin.tt_news {
  archive = 1
  datetimeDaysToArchive = 30
  enableArchiveDate = 1
  archiveTypoLink.parameter = {$archiveTypolink}
  reverseAMenu = 1
}
plugin.tt_news.displayList.date_stdWrap.strftime = %A %d. %B %Y
plugin.tt_news.displayList.age_stdWrap.age = Min| Std| Tage| Jahr
plugin.tt_news.displaySingle.age_stdWrap.age = Min| Std| Tage| Jahr 

I have verified
that fileadmin/template/news/tt_news_template.tmpl
file is in place (and only one of the templates is modified, so I
should at least see default styling, right?) 

I then went back to the root page template and modified the
TypoScript so that it should include the tt_news CSS: 

# Default Page Object
page = PAGE
page.includeCSS {
  file1 = fileadmin/templates/news/tt_news_template.css
  }
page.typeNum=0
page.10 = USER
page.10.userFunc = tx_templavoila_pi1->main_page 

Now, when I preview Interviews and then 'view source', I see the main
site CSS file but I do not see the tt_news_template.css file. What I
do see, however, is the text "no news in this list." The General
Record Storage Page for Interviews is the News system folder
(hierarchy above). You can view the Interviews page at:
http://www.milpro.net/index.php?id=2 [1] 

Any thoughts on what I am doing wrong? The end goal is going to be to
have it list the articles and then have a comments section at the end.


Thanks for any
help.
-jared 

 

Links:
------
[1] http://www.milpro.net/index.php?id=2


More information about the TYPO3-english mailing list