---
title: "Default News ID bei Single View"
url: "https://www.typo3.net/d/37822-default-news-id-bei-single-view"
source: "typo3.net"
tags: ["Extensions","Frage","tt_news"]
created: "2006-02-14"
last_reply: "2006-02-14"
replies: 4
solved: false
page: 1
pages: 1
lang: "de"
---

# Default News ID bei Single View

Extensions · 4 Antworten · gestartet 2006-02-14

## Eröffnungsbeitrag

**teufelm** · 2006-02-14 · [Beitrag #1](https://www.typo3.net/d/37822-default-news-id-bei-single-view/1)

Hi!

Habe das Problem, dass ich für den Single View die Deafult newsID nicht setzten kann. Habe veruscht das Handbuch von Seite 57 umzustezen. Leider ohne Erfolg

Vielleicht kann wer mein Setup Script mal ansehen und mir sagen, was da falsch ist!

Danke!

```typoscript
#######################################################

# set the TYPO3 language to german
config.language = de

# set the PHP locale to german
config.locale_all =  German_Austria


#######################################################
#Template

temp.mainTemplate = TEMPLATE
temp.mainTemplate {
   template = FILE
   template.file = fileadmin/template/pi-aktuell.htm
   workOnSubpart = DOCUMENT_BODY
   subparts.normal < styles.content.get
   subparts.left < styles.content.getLeft
   subparts.right < styles.content.getRight
}

#######################################################
# Default PAGE object:

page = PAGE
page.typeNum = 0
page.10 < temp.mainTemplate
page.stylesheet = fileadmin/css/pi-aktuell.css


#######################################################
# plugin_ttnews

plugin.tt_news {

#template auswählen
templateFile = fileadmin/template/tt_news_template.html

# tt_news date & time formats
archiveTitleCObject {
10.strftime = %B %Y
}
getRelatedCObject {
20.strftime = %d.%m.%Y %H:%M
}
displaySingle {
date_stdWrap.strftime= %d.%m.%Y
time_stdWrap.strftime= %H:%M
}
displayLatest {
date_stdWrap.strftime= %d.%m.%Y
time_stdWrap.strftime= %H:%M
}
displayList {
date_stdWrap.strftime= %A %d. %B %Y
time_stdWrap.strftime= %d.%m.%y %H:%M
}

_LOCAL_LANG.de.noNewsIdMsg =  

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

# fill the content of the maincolumn to a tmp.object
workOnSubpart = DOCUMENT_BODY
tmp.pagecontent < page.10.subparts.normal 

# clear the content of the main column
page.10.subparts.normal >

# build a new object for this column as contentobjectarray
page.10.subparts.normal = COA
page.10.subparts.normal {
  10 = CONTENT
  10.table = tt_news
  10.select {

    # insert the pids of all pages from where you want to fetch news.
    # the recursivefield has no influence on this selection
    pidInList = 6
    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

  # reinsert  the normal pagecontent to the page
  20 < tmp.pagecontent
}


#######################################################
```

## Antworten

### [#2](https://www.typo3.net/d/37822-default-news-id-bei-single-view/2) · tandem · 2006-02-14

Hallo,

```typoscript
#
_LOCAL_LANG.de.noNewsIdMsg =  
# set the tt_news singlePid to the current page
plugin.tt_news.singlePid = 3
```

Zähl mal Deine Klammern durch!
Danach steht plugin.tt_news.singlePid = 3
noch innerhal der plugin.tt_news Deklaration.

### [#3](https://www.typo3.net/d/37822-default-news-id-bei-single-view/3) · teufelm · 2006-02-14

uupps ;-)

Vielen Dank!!!

Martin

### [#4](https://www.typo3.net/d/37822-default-news-id-bei-single-view/4) · theo · 2006-02-14

@teufelm

Ich hätte da mal ne Frage:
Bei mir wird genau diese default-Single-News nicht so ausgegeben wie es normal wäre.
Zuem einen sieht man plötzlich den Marker ###COMMENTS### und zum anderen werden im Feld "Related news" nur die Links auch wirklich verlinkt, die auf interne Seiten zeigen, aber leider nicht die, die auf andere News zeigen.

Ist das bei Dir genauso?

### [#5](https://www.typo3.net/d/37822-default-news-id-bei-single-view/5) · teufelm · 2006-02-14

@theo

nein, bei mir ist nun alles so, wie ich es haben möchte.

bin noch zu neu in typo3 um dir möglicherweise weiterhelfen zu könne.

lg

---

Quelle: „Default News ID bei Single View“, typo3.net, https://www.typo3.net/d/37822-default-news-id-bei-single-view
Beiträge von Mitgliedern des Forums. Bitte mit Link auf die Diskussion zitieren.
