Einzelnen Beitrag anzeigen
  #1  
Alt 07.01.07, 17:25
BigBen BigBen ist offline
Forum Newbie
 
Registriert seit: 03.01.07
Beiträge: 11
Unglücklich

no news_id given


Ich krieg immer die Meldung "no news_id given", wenn ich die SINGLE-news (tt_news 2.4.0) Seite anklicke. Klar, weil ich dorthin verlinkt habe, ohne dass man auf eine Voransichts-Nachricht klicken muss, d.h. ohne dass eine ID übergeben wird.

Im tt_news manual steht, dass man per "default" mit folgendem code im ext-template der Seite, die die SINGLE-news anzeigen soll, die aktuellste Nachricht anzeigen lassen kann.

###################
# hide the "no news id" message
plugin.tt_news._LOCAL_LANG.default.noNewsIdMsg =  

# set the tt_news singlePid to the current page
plugin.tt_news.singlePid = 11

# fill the content of the main-column to a tmp.object
tmp.pagecontent < seite.10.marks.CONTENT

# clear the content of the main column
seite.10.marks.CONTENT >

# build a new object for this column as content-object-array
seite.10.marks.CONTENT = COA
seite.10.marks.CONTENT {


# 10 = IMAGE
# 10.file=GIFBUILDER
# 10.file {
# XY = 100, 20
# backColor = #808080
# 10 = TEXT
# 10.text = blabla
# 10.fontSize = 15
# 10.fontColor = white
# 10.fontFile = fileadmin/fonts/arial.ttf
# 10.niceText = 1
# 10.offset = 1, 16
# }


10 = CONTENT
10.table = tt_news
10.select {
# insert the pids of all pages from where you want to fetch news.
# the recursive-field has no influence on this selection
pidInList = 19, 20
orderBy = datetime desc
max = 1
}

# insert the object "10." only if there is no SINGLE news selected
10.stdWrap.if.isFalse.data = GPvar:tx_ttnews|tt_news
# re-insert the normal pagecontent to the page
20 < tmp.pagecontent
}

Hab ich also in ein ext-template reinkopiert.
Die Meldung "no news id" kommt jetzt nicht mehr, allerdings wird auch keine aktuellste Nachricht angezeigt, sondern einfach nix.

Wenn ich die # oben wegmache, d.h. statt "10 = CONTENT" (auskommentieren) den Abschnitt "10 = IMAGE" reinmache, dann seh ich tatsächlich blabla als IMAGE, wenn keine Nachricht angeklickt wurde - so wie's eben sein soll.

Warum geht's bei dem "10 = CONTENT" Abschnitt nicht? Was mache ich falsch?

So langsam hab ich so viele Probleme mit typo3 an der Backe, dass ich bald keinen Bock mehr hab.

Ben
Mit Zitat antworten