Hallo Sven, könnte dies auch für mein Problem der Lösungsansatz sein? wo finde ich genau die marker " xxx < styles.content.get(für die Hauptspalte)". Im Template "page_blocks_configuration" wo ich die Blocks definiert habe steht neben lib.contentleft, lib.contentright auch lib.conten mit folgendem Inhalt im Setup:
# Insert the news plugin in single-view mode instead of normal page content if a news article is requested
[globalVar = GP:tx_ttnews|tt_news > 0] && [globalVar = TSFE:id = {$plugin.tt_news.singlePid}]
lib.content < plugin.tt_news
lib.content {
# First empty the code field and then set it to single-view
code >
code = SINGLE
}
[else]
# In all other cases, get the content of the middle column and add it to the 'content' part
lib.content < styles.content.get
[global]
lib.content {
# Wrap it in the markers for the search engine, so it knows that this part has to be indexed
stdWrap.wrap = <!--TYPO3SEARCH_begin--> | <!--TYPO3SEARCH_end-->
}
fehlt hier was?
Im Template für die page steht folgendes:
# Make the PAGE object
page = PAGE
page {
# Regular pages always have typeNum = 0
typeNum = 0
# Add the icon that will appear in front of the url in the browser
# This icon will also be used for the bookmark menu in browsers
shortcutIcon = {$filepaths.images}favicon.ico
# Add class to bodytag to select which columns will be used in the HTML template
# Labels for the values used in this field are defined in the TSconfig field of the root page of the website
bodyTagCObject = CASE
bodyTagCObject {
# The value of the CASE object will depend on the value of the layout field in the page records
key.field = layout
# Define the default value
default = TEXT
default.value = <body>
# Copy the default value to 0
0 < .default
# Add different values for cases 1, 2 and 3
1 = TEXT
1.wrap = <body class="|">
1.value = hideRightColumn
2 < .1
2.value = hideLeftColumn
3 < .1
3.value = hideRightAndLeftColumn
}
# Add a TEMPLATE object to the page
# We use the template autoparser extension to easily replace parts of the HTML template by dynamic TypoScript objects
10 = TEMPLATE
10 {
# Use the HTML template from the automake template plugin
template =< plugin.tx_automaketemplate_pi1
# Use the <body> subpart
workOnSubpart = DOCUMENT_BODY
# Link content and page blocks to id's that have been enabled in the
# automaketemplate template in the extension_configuration sysfolder
subparts {
# Insert menu's from lib-objects into the appropriate subparts
navigationFirstLevelMenu < menu.firstlevel
navigationSecondLevelMenu < menu.secondlevel
topMenu < menu.top
languageMenu < menu.language
breadcrumb < menu.breadcrumb
# Insert various TypoScript lib objects into the appropriate subparts of the template
siteTitle < lib.sitetitle
searchBox < lib.searchbox
footerContent < lib.footer
# Insert content as already constructed in TypoScript objects into subparts
mainContent < lib.content
secondaryContent < lib.contentright
navigationContent < lib.contentleft
}
}
}
Sven.Krause schrieb
Eigentlich ist es ganz einfach.
Bei deinem code:
tmp.pagecontent < page.10.subparts.contentarea
page.10.subparts.contentarea >
page.10.subparts.contentarea = COA
page.10.subparts.contentarea
musst du einfach 10.subparts.contentarea durch deinen Marker ersetzen in dem die tt_news erscheinen.
In einem deiner Template's wirst du wohl den marker bestimmt haben mit xxx < styles.content.get(für die Hauptspalte) und dieses xxx musste an stelle von 10.subparts.contentarea eintragen, dann funktioniert es wunderbar.
ich habe ein kleines Problem mit tt_news.... bzw. ich
finde einfach keine Lösung...
Ausgangssituation: (Typo3 4.5.13 und tt_news 3.4.0)
Auf der Seitet "Aktuelles" mit 3 Spalten, habe ich in der mittleren Spalte als erstes Element
eine Single-Ansicht der tt_news und direkt unter dieser Ansicht, also auch in der mittleren Spalte, eine List-Ansicht der tt_news eingefügt.
Klickt man in der List-Ansicht auf einen Beitrag, wird dieser auch in der Single-Ansicht, der gleichen Seite übergeben
und angezeigt... soweit so gut.
Ich möchte nun beim Laden der Seite bereits in der Single-Ansicht die letzte, bzw. die aktuellste News komplett anzeigen.
Ohne die Lösung Last-Ansicht zu verwenden. Laut Doku müsste dies auch möglich sein, nur wird bei mir beim Laden der Seite
"Aktuelles" stets "Keine news_id übergeben." im Fenster Single angezeigt. Erst beim Klicken auf eine News in der List-Ansicht wird
diese in der Single-Ansicht angezeigt. Alle Funktionen im Script (siehe unten) funktionieren, bis auf diese, im unteren Abschnit bei
PROBLEM.
Als Lösungsansatz habe ich mich, in Bezug auf die Doku, an folgendem versucht:
["..Default news id
Insert the following lines to the setup field of an ext-template at the page where
you want to display the latest news item in SINGLE view if no SINGLE view for another record was requested:...]
http://typo3.org/extension-manuals/tt_news/3.1.0/view/1/4/#id2626798
Hier mein Script das ich als Template "define.tt_news" der Seite "Aktuelles" hinzugefügt habe.
### @ Sven: DIESEN CODE VERWENDE ICH
#
###################### KONSTANTEN (Fenster) ########################
#
# Page ID News: Die ID der Seite wo die News gespeichert sind
pid_list = 139
#
# Page ID Singlenews: Die ID der Seite wo die SingleNews angezeigt werden sollen
singlePid = 135
#
# Page ID Archive: Die ID der Seite in denen die Archive angezeigt werden sollen
archiveTypoLink = 138
####################### SETUP (Fenster)###############################
# Pfad zum eigenen Template
plugin.tt_news.templateFile = fileadmin/default/templates/extensions/tt_news/tt_news_v3_template.html
# CSS Formatierung für tt_news
page.includeCSS {
file1 = fileadmin/default/templates/css/tt_news_v3_styles.css
file1.media = screen
}
# Variable pid_list wird leer gemacht
plugin.tt_news.pid_list >
# PID wird über eine Konstante festgelegt
plugin.tt_news.pid_list = {$pid_list}
# Rekursiv, wenn euere News in Unterordner sind
plugin.tt_news.recursive >
plugin.tt_news.recursive = 1
# UID der Seite Singleview
plugin.tt_news.singlePid = {$singlePid}
# Archive Aktivieren
# UID der Archiveseite
plugin.tt_news {
archive = 1
archiveTypoLink.parameter = {$archiveTypoLink}
}
# Keine Meldung bei keiner Nachricht anzeigen
# plugin.tt_news.noNewsIdMsg_stdWrap.if.equals =
# Benennung "weiter" und "zurück" Link
plugin.tt_news._LOCAL_LANG.de{
more = [weiterlesen] »
backToList = « [zurück]
}
# Anzahl der Bilder pro Meldung in der Listansicht
plugin.tt_news.displayList.imageCount = 1
# Erstes Bild ausblenden wenn mehr als 1 Bild vorhanden
plugin.tt_news.firstImageIsPreview = 1
# Erstes Bild in der Singel Ansicht immer ausblenden
# plugin.tt_news.forceFirstImageIsPreview = 1
# Formatiere Datum Ausgaben der News
# Formatiere Single View Datum auf Kurzformat
# plugin.tt_news.displaySingle.date_stdWrap.strftime = %d.%m.%y
plugin.tt_news.displaySingle.date_stdWrap.strftime= %A %d. %B %Y
plugin.tt_news.displayList.date_stdWrap.strftime = %A %d. %B %Y
# plugin.tt_news.displayList.date_stdWrap.strftime= %d.%m.%Y
# Fehlerbehebung:Ausgabe des Feldes "Subheader" kein konformes HTML
plugin.tt_news {
general_stdWrap >
displaySingle {
content_stdWrap.parseFunc < lib.parseFunc_RTE
subheader_stdWrap >
subheader_stdWrap.wrap =<p>|</p>
}
}
# Animiertes Click-Enlarge mit "Ligtbox" bei Bildern aktivieren
plugin.tt_news.displaySingle.image.imageLinkWrap {
JSwindow = 0
directImageLink = 1
linkParams.ATagParams.dataWrap = class = "lightbox" rel="lightbox{field:uid}"
height =
width =
}
lib.parseFunc_RTE.tags.img.postUserFunc.imageLinkWrap.typolink.ATagParams.cObject.20.ifEmpty = Open image in lightbox
# Bildergröße bestimmen für List, Single und Thumnails
plugin.tt_news.displayList {
image.file.width = 105
image.file.height = 105c-80
image.file.maxW = 105
image.file.maxH = 105c
}
plugin.tt_news.displaySingle {
image.file.width =
image.file.height =
image.file.maxW = 150
image.file.maxH =
image {
#thumbnail
file.maxW = 200
file.maxH =
file.width >
file.width =
file.height =
#große version
imageLinkWrap.width =
imageLinkWrap.height =
}
}
# Einzelnen Seiten im HTML anzeigen
plugin.tt_news.limit = 10
plugin.tt_news.pageBrowser.showFirstLast = 0
plugin.tt_news.pageBrowser.showRange = 0
plugin.tt_news.pageBrowser.maxPages = 10
plugin.tt_news.latestLimit = 10
plugin.tt_news._LOCAL_LANG.de.pi_list_browseresults_prev = « [zurück]
plugin.tt_news._LOCAL_LANG.de.pi_list_browseresults_next = [weiter] »
# Dateien zum Download anzeigen mit Grröße
plugin.tt_news {
newsFiles_stdWrap.wrap = <dl class="news-single-files"><hr />|</dl>
newsFilesHeader_stdWrap.wrap = <dt>|</dt>
newsFiles {
path = uploads/media/
target = _blank
icon = 1
stdWrap.wrap = <dd>|</dd>
size = 1
size.wrap = <span class="zb-class-name"> - ( | )</span>
size.bytes = 1
size.bytes.labels = " | Kbyte| Mbyte| Gbyte"
}
}
#PROBLEM !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
#
# Aktuellste News automatisch in der Single-Ansicht
#
# Nachricht exclusiv in einer Ansicht anzeigen
# plugin.tt_news.excludeAlreadyDisplayedNews = 0
# set the tt_news singlePid to the current page
plugin.tt_news.singlePid = 135
# fill the content of the main-column to a tmp.object
tmp.pagecontent < page.10.subparts.mainContent
# clear the content of the main column
page.10.subparts.mainContent >
# build a new object for this column as content-object-array
page.10.subparts.mainContent = COA
page.10.subparts.mainContent {
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 = 139
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
}
bin über jeden Tip dankbar,
Gruß Bernd