Hallo Community,
habe die tt_news angepasst, sieht wie folgt aus:
Bild: i9.tinypic.com/4cngrif.gif
Leider sind die News Header nicht mehr zu klicken.
Die Frage ist nun, ob dies an den Konfigurationsfiles unter typo3conf/ext/tt_news/... liegt oder ob es an den Plugin-Einstellungen unter Template/Constant Editor liegt ?
Es ist doch so, dass es eigentlich nur die Einstellungen sein können, die unter /typo3conf etc. liegen.
Denn alles was unter dem Constant Editor gemacht wird landet doch im Site template unter dem Feld constants ?
Habe die Datei news_template.tmpl und einige andere editiert. Aber den Fehler nicht gefunden.
Es gibt ein Wrap Probelm, aber ich weiss nicht wo und warum ?
Hat jemand einen TIP ?
Danke und Ciao
Kazim
hi kazi,
kazi schriebDie Frage ist nun, ob dies an den Konfigurationsfiles unter typo3conf/ext/tt_news/... liegt oder ob es an den Plugin-Einstellungen unter Template/Constant Editor liegt ?
Poste bitte dein List/Latest-spezifisches Script ins Forum. Hast Du im News-Template unter "typo3conf/ext/tt_news/" die Marker/Subparts bearbeitet? Oder evtl. die Extension-PHP-Files angepasst?
Oder sind diese dargestellten Links die "Related News" innerhalb eines Single-Artikels?
grüsse
Hallo Toyde,
hauptsächlich habe ich die news_template.tmpl und die setup.txt editiert.
In der Setup.txt habe ich das Datumformat und den Wrap geändert. Heisst jedes wrap erhält ein Bild zugewiesen. in folgender Weise:
title_stdWrap.wrap = <b> <img src="images/ocd_more_red.gif" width="20" height="9" alt="" border="0"> | </b>
Nachfolgende Datei news_template.tmpl ist ja für das Layout zustaendig, und da habe ich die meisten Veraenderungen vorgenommen, die einzelnen Bereiche habe ich je nach bedarf auskommentiert bzw. einkommentiert.
Aber es könnte an einem SUBPART Problem liegen.
<!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>
<title>News example template</title>
</head>
<body>
<h1>NEWS TEMPLATES</h1>
<h2>EXAMPLE</h2>
<br />
<pre>
<b>Global markers, as set up in TypoScript:</b>
These are substituted throughout the whole template.
<em>Markers:</em>
GW1B / GW1E - wrap for news headers in single view
GW2B / GW2E - wrap for more-links and the pagebrowser
GW3B / GW3E - wrap for headers in latest and amenu templates
GC1 - first alternating color
GC2 - second alternating color
GC3 - color for headers in latest and amenu templates
GC4 - bgcolor for items in list view
<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 - the 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
LINK_NEXT
</pre>
<br /><br /><hr />
<br />
<h4>TEMPLATE_LATEST</h4>
<em>This is the template for the latest news, typically displayed on a frontpage.</em>
<br />
<br />
<!-- ###TEMPLATE_LATEST### begin
This is the template for the latest news, typically displayed on a frontpage
-->
<table cellpadding="4" cellspacing="1" border="0" width="1">
<tr bgcolor="###GC3###">
<td valign="bottom">###GW3B### ###LATEST_HEADER######GW3E###</td>
</tr>
<!-- ###CONTENT### begin
This is the part of the template substituted with the list of news:
-->
<!-- ###NEWS### begin
Template for a single item
-->
<tr>
<td bgcolor="###GC1###" valign="top">
###GW2B### <br> ###NEWS_DATE### ###NEWS_TIME### <br />
<!--###LINK_ITEM###-->###NEWS_TITLE###<!--###LINK_ITEM###--><br />
<!--###LINK_ITEM###-->###NEWS_IMAGE###<!--###LINK_ITEM###-->
###NEWS_SUBHEADER###
<!--###LINK_ITEM###-->###MORE###<!--###LINK_ITEM###--><br />
###TEXT_CAT_LATEST### ###NEWS_CATEGORY######NEWS_CATEGORY_IMAGE### ###GW2E###<br />
</td>
</tr>
<!-- ###NEWS### end-->
<!-- ###NEWS_1### begin
Template for an alternative item
-->
<tr>
<td bgcolor="###GC2###" valign="top">
###GW2B### <br> ###NEWS_DATE### ###NEWS_TIME### <br />
<!--###LINK_ITEM###-->###NEWS_TITLE###<!--###LINK_ITEM###--><br />
<!--###LINK_ITEM###-->###NEWS_IMAGE###<!--###LINK_ITEM###-->
###NEWS_SUBHEADER###
<!--###LINK_ITEM###-->###MORE###<!--###LINK_ITEM###--><br />
###TEXT_CAT_LATEST### ###NEWS_CATEGORY######NEWS_CATEGORY_IMAGE### ###GW2E###<br />
</td>
</tr>
<!-- ###NEWS_1### end-->
<!-- ###CONTENT### end -->
<tr bgcolor="###GC3###">
<td valign="bottom"><!--###LINK_ARCHIVE###-->###GW3B### ###GOTOARCHIVE### ###GW3E###<!--###LINK_ARCHIVE###--></td>
</tr>
<tr>
<td><img alt="" src="clear.gif" width="150" height="1" /></td>
</tr>
</table>
<!-- ###TEMPLATE_LATEST### end -->
<br /><br /><hr />
<br />
<b>TEMPLATE_LIST</b>
<em>This is the template for the list of news in the archive or news page or search.</em>
<br />
<!-- ###TEMPLATE_LIST### begin
This is the template for the list of news in the archive or news page or search
-->
<table cellpadding="4" cellspacing="1" border="0" width="98%">
###NEWS_CATEGORY_ROOTLINE###
<!-- ###CONTENT### begin
This is the part of the template substituted with the list of news:
-->
<!-- ###NEWS### begin
Template for a single item
-->
<tr bgcolor="###GC1###">
<td valign="top" colspan="3"> <!-- Dies ist die erste des Newspaares -->
###GW1B### <!-- ###LINK_ITEM###--> ###NEWS_DATE### ###NEWS_TITLE### <!-- ###LINK_ITEM###--> ###GW1E###
###GW2B### <!-- ###TEXT_NEWS_AGE### --> <!-- ###NEWS_AGE### --> ###GW2E###
</td>
</tr>
<!-- <tr><td></td></tr>--> <!-- Dies sind die Abstaende zwischen den News -->
<!-- <tr bgcolor="###GC4###">
<td valign="top">
###GW1B### ###NEWS_SUBHEADER### ###GW1E###
###GW2B### <!--###LINK_ITEM###--> ###MORE### <!--###LINK_ITEM###--> ###GW2E###
###GW2B### ###NEWS_AUTHOR### ###NEWS_TIME### <br />
###TEXT_CAT### ###NEWS_CATEGORY### ###NEWS_CATEGORY_IMAGE###
###NEWS_LANGUAGE### ###GW2E###
</td>
<td><img alt="" src="clear.gif" height="1" width="10" /></td>
<td width="1%">###LINK_ITEM### ###NEWS_IMAGE### ###LINK_ITEM###</td>
</tr>
<tr>
<td valign="top" colspan="3"><img alt="" src="clear.gif" height="5" width="1" /></td>
</tr> -->
<!-- ###NEWS### end-->
<!-- ###NEWS_1### begin
Template for an alternative item in single view
-->
<tr bgcolor="###GC2###">
<td valign="top" colspan="3"> <!-- Dies ist die zweite des Newspaares -->
###GW1B### <!--###LINK_ITEM###--> ###NEWS_DATE### ###NEWS_TITLE###<!--###LINK_ITEM###--> ###GW1E###
###GW2B### <!-- ###TEXT_NEWS_AGE### ###NEWS_AGE### ###GW2E### -->
</td>
</tr>
<!-- <tr><td></td></tr> --> <!-- Dies sind die Abstaende zwischen den News -->
<!-- <tr bgcolor="###GC4###">
<td valign="top">
###GW1B### ###NEWS_SUBHEADER### ###GW1E###
###GW2B### <!--###LINK_ITEM###--> ###MORE### <!--###LINK_ITEM###--> ###GW2E###
###GW2B### ###NEWS_AUTHOR### ###NEWS_TIME### <br />
###TEXT_CAT### ###NEWS_CATEGORY### ###NEWS_CATEGORY_IMAGE###
###NEWS_LANGUAGE### ###GW2E###
</td>
<td><img alt="" src="clear.gif" height="1" width="10" /></td>
<td width="1%"><!--###LINK_ITEM###--> ###NEWS_IMAGE### <!--###LINK_ITEM###--></td>
</tr>
<tr>
<td valign="top" colspan="3"><img alt="" src="clear.gif" height="5" width="1" /></td>
</tr>-->
<!-- ###NEWS_1### end-->
<!-- ###CONTENT### end -->
<tr>
<td align="center" colspan="3">###GW2B### ###LINK_PREV### ###BROWSE_LINKS### ###LINK_NEXT### ###GW2E###</td>
</tr>
</table>
<!-- ###TEMPLATE_LIST### end -->
<br /><br /><hr />
<br />
<h4>TEMPLATE_SINGLE</h4>
<em>This subpart is used to display single news items</em><br />
<br />
<!-- ###TEMPLATE_SINGLE### begin
This subpart is used to display single news items
-->
###NEWS_CATEGORY_ROOTLINE###
<table border="0" cellspacing="0" cellpadding="1" width="98%">
<tr>
<td valign="top">
###NEWS_TITLE### <br />
###GW2B### <br> ###NEWS_DATE### ###NEWS_TIME### <br />
###TEXT_NEWS_AGE### ###NEWS_AGE### ###GW2E###<br />
<img alt="" src="clear.gif" width="1" height="5" /><br />
###GW2B### ###NEWS_AUTHOR###<br />
###TEXT_CAT### ###NEWS_CATEGORY### ###NEWS_CATEGORY_IMAGE### ###GW2E###<br />
###GW1B### ###NEWS_SUBHEADER### <br />
###NEWS_IMAGE###
###NEWS_CONTENT### <br />
###TEXT_LINKS###<br />
###NEWS_LINKS###<br />
###TEXT_RELATED###<br />
###NEWS_RELATED###
<br />
###TEXT_FILES###<br />
###FILE_LINK###
###GW1E###<br />
###GW2B### <!--###LINK_ITEM###--> ###BACK_TO_LIST### <!--###LINK_ITEM###--> ###GW2E###
</td>
</tr>
</table>
<!-- ###TEMPLATE_SINGLE### end -->
<br /><br /><hr />
<br />
<h4>TEMPLATE_SINGLE_RECORDINSERT</h4>
<em>this is used if news-items are displayed with the 'insert records' content element </em><br />
<br />
<!-- ###TEMPLATE_SINGLE_RECORDINSERT### begin
This subpart is used to display single news items with the content element 'insert records'
-->
<table border="0" cellspacing="0" cellpadding="1" width="98%">
<tr>
<td valign="top">
###NEWS_TITLE###<br />
###GW2B### <br>###NEWS_DATE### ###NEWS_TIME### <br />
###TEXT_NEWS_AGE### ###NEWS_AGE### ###GW2E###<br />
<img alt="" src="clear.gif" width="1" height="5" /><br />
###GW2B### ###NEWS_AUTHOR### <br />
###TEXT_CAT### ###NEWS_CATEGORY### ###NEWS_CATEGORY_IMAGE######GW2E###<br />
###GW1B### ###NEWS_SUBHEADER### <br />
###NEWS_IMAGE###
###NEWS_CONTENT### <br />
###TEXT_LINKS###<br />
###NEWS_LINKS###<br />
###TEXT_RELATED###<br />
###NEWS_RELATED###
<br />
###TEXT_FILES###<br />
###FILE_LINK###
###GW1E###<br />
</td>
</tr>
</table>
<!-- ###TEMPLATE_SINGLE_RECORDINSERT### end -->
<br /><hr /><br />
<h4>TEMPLATE_ARCHIVE</h4>
<em>Subpart for the news archive menu.</em><br />
<br />
<!-- ###TEMPLATE_ARCHIVE### begin
Subpart for the news archive menu
-->
<table cellpadding="4" cellspacing="1" border="0" width="1">
<tr bgcolor="###GC3###">
<td valign="bottom">###GW3B### ###ARCHIVE_HEADER######GW3E###</td>
</tr>
<!-- ###CONTENT### begin
This is the part of the template substituted with the list of items:
-->
<!-- ###MENUITEM### begin
Template for a single item
-->
<tr>
<td bgcolor="###GC2###" valign="top" nowrap="nowrap">
###GW2B###<!--###LINK_ITEM###-->###ARCHIVE_TITLE###<!--###LINK_ITEM###--> - (###ARCHIVE_COUNT### ###ARCHIVE_ITEMS###)###GW2E###</td>
</tr>
<!-- ###MENUITEM### end-->
<!-- ###MENUITEM_1### begin
Template for a single item with alternative bgcolor
-->
<tr>
<td bgcolor="###GC1###" valign="top" nowrap="nowrap">
###GW2B###<!--###LINK_ITEM###-->###ARCHIVE_TITLE###<!--###LINK_ITEM###--> - (###ARCHIVE_COUNT### ###ARCHIVE_ITEMS###)###GW2E###</td>
</tr>
<!-- ###MENUITEM_1### end-->
<!-- ###CONTENT### end -->
<tr>
<td><img alt="" src="clear.gif" width="150" height="1" /></td>
</tr>
</table>
<!-- ###TEMPLATE_ARCHIVE### end -->
<br /><br /><hr /><br />
<h4>TEMPLATE_ARCHIVE_NOITEMS</h4>
<em>Shown if the archive has no items!</em><br />
<br />
<br />
<!-- ###TEMPLATE_ARCHIVE_NOITEMS### begin
Shown if the archive has no items!
-->
<table cellpadding="4" cellspacing="1" border="0" width="1">
<tr bgcolor="###GC3###">
<td valign="bottom">###GW3B### ###ARCHIVE_HEADER######GW3E###</td>
</tr>
<tr>
<td bgcolor="###GC2###" valign="top">###GW2B### ###ARCHIVE_EMPTY_MSG### ###GW2E###</td>
</tr>
<tr>
<td><img alt="" src="clear.gif" width="150" height="1" /></td>
</tr>
</table>
<!-- ###TEMPLATE_ARCHIVE_NOITEMS### end -->
<br /><br /><hr /><br />
<h4>TEMPLATE_SEARCH</h4>
<em>Subpart for the search-form.</em><br />
<br />
<br />
<!-- ###TEMPLATE_SEARCH### begin
Subpart for the search-form
-->
<table border="0" cellpadding="4" cellspacing="1">
<tr>
<td><form method="post" action="###FORM_URL###">
<input size="30" maxlength="100" type="text" name="tx_ttnews[swords]" value="###SWORDS###" />
<input type="submit" name="search" value="###SEARCH_BUTTON###" />
</form></td>
</tr>
</table>
<!-- ###TEMPLATE_SEARCH### end -->
<br /><br /><hr /><br />
<h4>TEMPLATE_SEARCH_EMPTY</h4>
<em>this is shown if the search result is empty</em><br />
<br />
<!-- ###TEMPLATE_SEARCH_EMPTY### begin -->
<table border="0" cellpadding="4" cellspacing="1">
<tr>
<td>###GW2B### ###SEARCH_EMPTY_MSG### ###GW2E###</td>
</tr>
</table>
<!-- ###TEMPLATE_SEARCH_EMPTY### end -->
<br /><hr /><br />
<h4>TEMPLATE_HEADER_LIST</h4>
<em>shows a list of news titles</em><br />
<br />
<!-- ###TEMPLATE_HEADER_LIST### begin -->
<table cellpadding="4" cellspacing="1" border="0" width="98%">
<!-- ###CONTENT### begin
This is the part of the template substituted with the list of news:
-->
<!-- ###NEWS### begin
Template for a single item
-->
<tr bgcolor="###GC1###">
<td valign="top">
###GW1B### <!--###LINK_ITEM###-->###NEWS_TITLE###<!--###LINK_ITEM###--> ###GW1E###<br />
###GW2B### ###NEWS_TIME###
###TEXT_CAT_LATEST### ###NEWS_CATEGORY### ###NEWS_CATEGORY_IMAGE###
###GW2E###
</td>
</tr>
<!-- ###NEWS### end-->
<!-- ###NEWS_1### begin
Template for an alternative item in single view
-->
<tr bgcolor="###GC2###">
<td valign="top">
###GW1B### <!--###LINK_ITEM###-->###NEWS_TITLE###<!--###LINK_ITEM###--> ###GW1E###<br />
###GW2B### ###NEWS_TIME###
###TEXT_CAT_LATEST### ###NEWS_CATEGORY### ###NEWS_CATEGORY_IMAGE###
###GW2E###
</td>
</tr>
<!-- ###NEWS_1### end-->
<!-- ###CONTENT### end -->
<tr>
<td align="center" colspan="3">###GW2B### ###BROWSE_LINKS### ###GW2E###</td>
</tr>
</table>
<!-- ###TEMPLATE_HEADER_LIST### end -->
<br />
<hr /><br />
<h4>TEMPLATE_CAT_RELATED</h4>
<em>shows a list of related news with the same category</em><br />
<br />
<!-- ###TEMPLATE_CAT_RELATED### begin -->
<!-- ###CONTENT### begin
This is the part of the template substituted with the list of news:
-->
<!-- ###NEWS### begin
Template for a single item
-->
###GW3B###<!--###LINK_ITEM###-->###NEWS_TITLE###<!--###LINK_ITEM###--> ###NEWS_TIME### ###GW3E###
<!-- ###NEWS### end-->
<!-- ###CONTENT### end -->
<!-- ###TEMPLATE_CAT_RELATED### end -->
<br />
</body>
</html>
News-Template, Zeile 189 ff
<td valign="top">
###GW1B### ###NEWS_SUBHEADER### ###GW1E###
###GW2B### <!--###LINK_ITEM###--> ###MORE### <!--###LINK_ITEM###--> ###GW2E###
Den Subpart LINK_ITEM (ebenfalls) um deinen NEWS_SUBHEADER legen.
grüsse
Ohne mich blamiern zu wollen :o , meinst du es so
###GW1B### ###LINK_ITEM### ###NEWS_SUBHEADER### ###LINK_ITEM### ###GW1E###
###GW2B### <!--###LINK_ITEM###--> ###MORE### <!--###LINK_ITEM###--> ###GW2E###
Habe ich gerade eingebaut, hat nicht gebracht, aber wie du evtl. siehst habe ich einen größeren Block auskommentiert(188-202), dies heisst ja, dass der SUBPART auch nicht zum Zuge kommt.
Interessant ist, dass der HTML-Code wie folgt aussieht:
<font face="verdana" size="2" color="black"> 14.11.06 <b> <img src="images/ocd_more_red.gif" width="20" height="9" alt="" border="0"> Freigabe von ...</b> </font>
Da fehlt wie üblich der TAG <a href="">bla</a>
a) Stimmt, deine "auskommentierte" Stelle habe ich übersehen - wie auch immer, dein Kommentar kann nicht greifen. "<!--" und "-->" auf 188/202 hebeln sich durch die Subparts gegenseitig aus. Kopier dein Template in ein syntax-highlightendes Tool und Du verstehst, was ich meine.
b) Die Subparts-Syntax schreibt man mit Kommentar, also so:
###GW1B### <!--###LINK_ITEM###--> ###NEWS_SUBHEADER###<!--###LINK_ITEM###--> ###GW1E###
###GW2B### <!--###LINK_ITEM###--> ###MORE### <!--###LINK_ITEM###--> ###GW2E###
Du hast glaube ich ein scheues Kommentar-Durcheinander :p .
grüsse
Danke vorerst 😉
Das mit dem Kommmentar durcheinander stimmt glaube ich, aber jetzt kann ich mich aud die Datei konzentrieren.
Danke und Ciao
Kazim
Hallo Leute, Hallo Toyde,
kann es eigentlich Ausnahmeeffekte geben, wenn ich die Extension tt_news aus dem Extension-Mager deinstalliere und danach das Verzeichnis tt_news von /typo3conf/ext/ lösche und dann die Extension tt_news neu installiere ?
Dies erscheint mir in der jetzigen Situation das einfachste, da ich den o.g. Fehler nicht beheben konnte.
Das Problem ist, daß der üblich LINK, siehe nachfolgend:
<font face="verdana" size=2 color=black> <strong><A href="index.php?id=1&backPID=1&tt_news=20">Freigabe von ...</A></strong> </font> <font face="verdana" size=1 color=black> - Freitag 2. of September </font>
wie folgt dargestellt wird und somit kein Link mehr ist, den man anklicken kann:
<font face="verdana" size="2" color="black"> 14.11.06 <strong> <img src="images/ocd_more_red.gif" width="20" height="9" alt="" border="0"> Freigabe von ...</strong> </font>
[/b]
Gelöst: Siehe
#541231