Zum Inhalt springen

tt_news Einzelansicht/SingleView --> bei Druckansicht: "Keine news_id übergeben."

Erstellt am 15. März 2010 · 1 Antwort · letzte Antwort am 6. Juli 2010

Tags: Frage

nadinek ·

Hallo zusammen,

ich habe auf meiner Seite eine Druckansicht eingerichtet.
Wenn ich bei den News in der Einzelansicht die Seite in der Druckversion darstellen möchte, erhalte ich eine Seite mit folgendem Inhalt:
"Einzelansicht - Keine news_id übergeben."

Bei der Listenansicht und der Latest-Ansicht gibt es keine Probleme, die Druckansicht wird korrekt dargestellt.

Installierte Extension:
tt_news 3.0.1
(Kann der Fehler auch mit anderen Extension zusammenhängen, wie z. B. realurl?)

Typoscript betreffend Druckansicht:

### Link zur Druckversion erzeugen ###
lib.druckversion = TEXT
lib.druckversion {
  field = uid
  wrap = <a href="index.php?id=|&type=98&no_cache=1" target="_blank">DRUCKEN / PRINT</a>
  }

### DRUCKVERSION ###
druckversion = PAGE
druckversion {
  typeNum = 98
  10 = CONTENT
  10.table = tt_content
  10.select.orderBy = sorting
  10.select.colPos = 0
  10.select.languageField = sys_language_uid

page.10 = TEMPLATE
page.10 {
     template = FILE
     template.file =  
     ...
     marks {
     ...
     DRUCKVERSION < lib.druckversion
     ...
     }
  }

Typoscript betreffend tt_news:
Konstanten:

plugin.tt_news.datetimeDaysToArchive = 60
plugin.tt_news.catTextMode = 3
plugin.tt_news.catImageMode = 3
plugin.tt_news.file.templateFile = fileadmin/templates/tt_news.html
plugin.tt_news._CSS_DEFAULT_STYLE >
plugin.tt_news.singlePid = 142
plugin.tt_news.backPid = 141
plugin.tt_news.pid_list = 137

Konfiguration:

plugin.tt_news.displayList.date_stdWrap.strftime = %A %d. %B %Y
plugin.tt_news.displayLatest.date_stdWrap.strftime = %A %d. %B %Y
plugin.tt_news.displaySingle.date_stdWrap.strftime = %A %d. %B %Y
plugin.tt_news.archiveTitleCObject.10.strftime = %A %d. %B %Y
plugin.tt_news.displayList.time_stdWrap.strftime =  
plugin.tt_news.displayLatest.time_stdWrap.strftime =  
plugin.tt_news.displaySingle.time_stdWrap.strftime =  

[globalVar = GP:L = 5]
  plugin.tt_news.displayList.date_stdWrap.strftime = %A, %d. of %B %Y
  plugin.tt_news.displayLatest.date_stdWrap.strftime = %A, %d. of %B %Y
  plugin.tt_news.displaySingle.date_stdWrap.strftime = %A, %d. of %B %Y
  plugin.tt_news.archiveTitleCObject.10.strftime = %A, %d. of %B %Y
[global]


plugin.tt_news._LOCAL_LANG.de.more = weiterlesen
plugin.tt_news._LOCAL_LANG.en.more = read more

Wo könnte der Fehler liegen? Wo fehlen Angaben? Wenn ich hier relevante Informationen vergessen habe, anzugeben, bitte ich um kurze Info.

In diesem Zusammenhang habe ich ebenfalls ein Problem mit der normalen Darstellung der Einzelansicht/SingleView.
Oberhalb der eigentlichen Nachricht, die Überschrift, Untertitel und Text enthält, steht die Bezeichnung "Einzelansicht". Sämtliche Versuche, diese über das html-Template auszublenden, gelangen ebenfalls nicht. Ich kann lediglich die eigentliche Überschrift einer Nachricht ausblenden, jedoch nicht den Wortlaut "Einzelansicht".

Hier noch das HTML-Template:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<!--
		IMPORTANT: The stylesheet link below is only for testing the template file directly in a browser while editing it.
		On the website the css styles for tt_news have to be include with the static TS template "default CSS style (tt_news)" or
		with an external file (see tt_news/res/tt_news_v2_styles.css) which you include via TypoSript in the "page" object.

 -->
	<title>new News example template</title>
    <link href="../res/tt_news_tut_main_stylesheet.css" rel="stylesheet" type="text/css" />
</head>

<body>

<h1>NEWS TEMPLATES</h1>
<h2>EXAMPLE</h2>

<br />
<pre>

<strong>Common markers:</strong>
These are substituted in all news item displaying templates:

<em>Markers:</em>
NEWS_UID - ID number (uid) of the news item
NEWS_TITLE - News item title
NEWS_AUTHOR - name of author
NEWS_EMAIL - email of author
NEWS_DATE - date
NEWS_TIME - time
NEWS_AGE - age of news item in minutes, hours, days or years
NEWS_SUBHEADER - subheader, if empty main content is inserted here in LIST and LATEST
NEWS_CONTENT - main content
NEWS_LINKS - news links
NEWS_CATEGORY - news item category
NEWS_CATEGORY_IMAGE - news item category image
NEWS_RELATED - links to related news
NEWS_IMAGE - news item images
NEWS_CATEGORY_ROOTLINE - category rootline

PAGE_UID - Page id of the parent page (pid)
PAGE_TITLE - Title of the parent page of the news item
PAGE_AUTHOR - Page author, if any
PAGE_AUTHOR_EMAIL - Page author email, if any

<em>News Language Markers (see pi/locallang.php):</em>
LATEST_HEADER - header for the LATEST element
GOTOARCHIVE - link to archive page in latest template
ARCHIVE_HEADER - same for AMENU
MORE - more ;-)
TEXT_CAT - text output before categories and category images in LIST view (eg: 'categories:')
TEXT_CAT_LATEST - the same in a shorter form for the LATEST element (eg: 'cat:')
BACK_TO_LIST - link back to list-view in single-view template
ARCHIVE_EMPTY_MSG - no items in archive
SEARCH_EMPTY_MSG - message for empty search results
TEXT_NEWS_AGE - text inserted before the age of the news item


<em>Wrapped Subparts:</em>
LINK_ITEM - link to the news item single display
LINK_PREV - used in the pagebrowser
BROWSE_LINKS - used in the pagebrowser
LINK_NEXT - used in the pagebrowser
</pre>

(...)

<h3>TEMPLATE_SINGLE</h3>
<em>This subpart is used to display single news items</em><br />

<!-- ###TEMPLATE_SINGLE### begin
	This subpart is used to display single news items
-->
<div class="news-single-item">
<!--###NEWS_CATEGORY_ROOTLINE###-->
<!--###NEXT_ARTICLE###-->
<!--###PREV_ARTICLE###-->
	<div class="news-single-rightbox">
		###NEWS_DATE### <!--###NEWS_TIME###--> <!--###TEXT_NEWS_AGE### ###NEWS_AGE###-->
		<!--###CATWRAP_B### ###TEXT_CAT### ###NEWS_CATEGORY### ###NEWS_CATEGORY_IMAGE### ###CATWRAP_E###
		###NEWS_AUTHOR###-->
	</div>
		<h1>###NEWS_TITLE###</h1>
		###NEWS_SUBHEADER###
		<hr class="cl-right" />

		###NEWS_IMAGE###
		###NEWS_CONTENT###
		<hr class="cl-right" />
			###ADDINFO_WRAP_B###

				  	###TEXT_RELATED###
				 	###NEWS_RELATED###

					###TEXT_FILES###
				 	###FILE_LINK###

					###TEXT_LINKS###
					###NEWS_LINKS###

					###TEXT_RELATEDBYCATEGORY###
					###NEWS_RELATEDBYCATEGORY###

			###ADDINFO_WRAP_E###
			###NEWS_SINGLE_PAGEBROWSER###
	<div class="news-single-backlink">
	<!--###LINK_ITEM###-->###BACK_TO_LIST###<!--###LINK_ITEM###-->
	</div>
</div>
<!-- ###TEMPLATE_SINGLE### end -->



<!-- ###TEMPLATE_SINGLE2### begin
	variant of TEMPLATE_SINGLE with 3 imagemarkers (prepared for imageMarkerOptionSplit)
-->

<div class="news-single-item">
<!--###NEWS_CATEGORY_ROOTLINE###-->
<!--###NEXT_ARTICLE###-->
<!--###PREV_ARTICLE###-->
	<div class="news-single-rightbox">
		###NEWS_DATE### <!--###NEWS_TIME###--> <!--###TEXT_NEWS_AGE### ###NEWS_AGE###-->
		<!--###CATWRAP_B### ###TEXT_CAT### ###NEWS_CATEGORY### ###NEWS_CATEGORY_IMAGE### ###CATWRAP_E###
		###NEWS_AUTHOR###-->
	</div>
		<h1>###NEWS_TITLE###</h1>
		###NEWS_SUBHEADER###
		<hr class="cl-right" />
		###NEWS_IMAGE_1###
		###NEWS_CONTENT###

		<hr class="cl-right" />
		###NEWS_IMAGE_2###
		<hr class="cl-left" />
			###ADDINFO_WRAP_B###

				  	###TEXT_RELATED###
				 	###NEWS_RELATED###

					###TEXT_FILES###
				 	###FILE_LINK###

					###TEXT_LINKS###
					###NEWS_LINKS###

					###TEXT_RELATEDBYCATEGORY###
					###NEWS_RELATEDBYCATEGORY###

			###ADDINFO_WRAP_E###
			###NEWS_IMAGE_3###
			###NEWS_SINGLE_PAGEBROWSER###
	<div class="news-single-backlink">
	<!--###LINK_ITEM###-->###BACK_TO_LIST###<!--###LINK_ITEM###-->
	</div>
</div>
<!-- ###TEMPLATE_SINGLE2### end -->

<br />
<br /><hr />
<br />
<h3>TEMPLATE_SINGLE_RECORDINSERT</h3>
<em>This subpart is used to display single news items with the "Insert Records" content element </em><br />
<br />
<br />

<!-- ###TEMPLATE_SINGLE_RECORDINSERT### begin
	This subpart is used to display single news items
-->

<div class="news-single-item">
			<div class="news-single-timedata">###NEWS_DATE### <!--###NEWS_TIME###--> ###TEXT_NEWS_AGE### ###NEWS_AGE###</div>
			<h1>###NEWS_TITLE###</h1>
			<!--###CATWRAP_B### ###TEXT_CAT### ###NEWS_CATEGORY### ###NEWS_CATEGORY_IMAGE### ###CATWRAP_E###
			###NEWS_AUTHOR###-->



			###NEWS_SUBHEADER###

			###NEWS_IMAGE###
			###NEWS_CONTENT###

						###ADDINFO_WRAP_B###

				  	###TEXT_RELATED###
				 	###NEWS_RELATED###

					###TEXT_FILES###
				 	###FILE_LINK###

					###TEXT_LINKS###
					###NEWS_LINKS###

					###TEXT_RELATEDBYCATEGORY###
					###NEWS_RELATEDBYCATEGORY###
			###ADDINFO_WRAP_E###
###NEWS_SINGLE_PAGEBROWSER###
<div class="news-single-backlink">
<!--###LINK_ITEM###-->###BACK_TO_LIST###<!--###LINK_ITEM###-->
</div>			</div>
<!-- ###TEMPLATE_SINGLE_RECORDINSERT### end --><br /><hr />
<br />
<br />
<br />
<h3>TEMPLATE_SINGLE_FORUM</h3>
<em>This subpart is used to display single news items with the "Insert Records" content element </em><br />
<br />
<br />

<!-- ###TEMPLATE_SINGLE_FORUM### begin
	This subpart is used to display single news items
-->

<div class="news-single-item">
			<div class="news-single-timedata">###NEWS_DATE### <!--###NEWS_TIME###--> ###TEXT_NEWS_AGE### ###NEWS_AGE###</div>
			<h2>###NEWS_TITLE###</h2>
			###CATWRAP_B### ###TEXT_CAT### ###NEWS_CATEGORY### ###NEWS_CATEGORY_IMAGE### ###CATWRAP_E###
			###NEWS_AUTHOR###



			###NEWS_SUBHEADER###

			###NEWS_IMAGE###
			###NEWS_CONTENT###

<div class="news-single-backlink">
<!--###LINK_ITEM###-->###BACK_TO_LIST###<!--###LINK_ITEM###-->
</div>			</div>
<!-- ###TEMPLATE_SINGLE_FORUM### end -->

(...)

</body>
</html>

Für Lösungen bin ich herzlichst dankbar!
nadinek

Tandrall ·

Hallo,

ich weiß zwar nicht, ob du das noch brauchst, doch notfalls hilft es vielleicht jemand anderem weiter.

An der Stelle, wo du deinen Print-Link erstellst, wird einfach nur keine News_ID übergeben, weshalb tt_news nicht weiß, welche News er dir anzeigen soll.
Siehe:

wrap = <a href="index.php?id=|&type=98&no_cache=1" target="_blank">DRUCKEN / PRINT</a>

Erweitere deinen Print-Link einfach um folgende Angabe:

tx_ttnews[tt_news]={GPvar:tx_ttnews|tt_news}

Wenn du zusätzlich noch die Index-Search benutzt und Suchergebnisse ebenfalls druckbar machen möchtest, kannst du dann noch folgendes hinzufügen:

tx_indexedsearch[sword]={GPvar:tx_indexedsearch|sword}

Alles in allem, sähe betreffende Codezeile dann bei dir folgendermaßen aus:

wrap = <a href="index.php?id=|&type=98&no_cache=1&tx_ttnews[tt_news]={GPvar:tx_ttnews|tt_news}&tx_indexedsearch[sword]={GPvar:tx_indexedsearch|sword}" target="_blank">DRUCKEN / PRINT</a>

Ich hoffe, ich konnte dir weiterhelfen.

Liebe Grüße und weiterhin frohes Schaffen,

Tandrall