All pastes #442440 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-04-16 09:14 UTC
rendered paste body
<!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>






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






<br />
<br />
<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>


<br />
<br />
<br />
<br />
<hr />
<br />
<br />
<br />
<h3>TEMPLATE_LATEST</h3>
<em>This is the template for the latest news, typically displayed on a frontpage.</em>
<br />
<br />
<br />
<br />



<!-- ###TEMPLATE_LATEST### begin
	This is the template for the latest news, typically displayed on a frontpage 
-->
<div class="news-latest-container">
	<!-- ###CONTENT### begin
		  This is the part of the template substituted with the list of news: 
	-->
		<!-- ###NEWS### begin 
			Template for a single item 
		-->
			  <div class="news-latest-item">
        <table border="0" cellpadding="0" cellspacing="0" width="100%" id="tab_latest">
         <tr>
         <td align="left" valign="top" width="80%">
				  <div id="latest_item"><!--###LINK_ITEM###-->###NEWS_TITLE###<!--###LINK_ITEM###--> <span class="news-latest-morelink"><!--###LINK_ITEM###-->... ###MORE###<!--###LINK_ITEM###--></span></div>
				  <br />###NEWS_SUBHEADER###
				 </td>
				 <td align="center" valign="middle" width="20%">###NEWS_IMAGE###</td>
         </tr>
         <tr>
          <td class="align_left">###NEWS_AUTHOR###</td>
          <td class="align_right news-latest-date">###NEWS_DATE### ###NEWS_TIME###</td>
         </tr>
        </table>
			  </div>
		<!-- ###NEWS### end-->		
	<!-- ###CONTENT###  end -->
</div>
<!-- ###TEMPLATE_LATEST### end -->




<br />
<br />
<br />
<br />
<hr />
<br />
<br />
<br />
<h3>TEMPLATE_LIST</h3>
<em>This is the template for the list of news in the archive or news page or search.</em>
<br />
<br />
<br />
<br />
<!-- ###TEMPLATE_LIST### begin
	This is the template for the list of news in the archive or news page or search
-->
<div class="news-list-container">
###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 
		-->
			<div class="news-list-item">				

<span class="news-list-date">###NEWS_DATE###</span>
        <h3>###NEWS_TITLE###</h3>
        ###NEWS_SUBHEADER### ###NEWS_IMAGE###
			
			<div class="news-list-morelink"><!--###LINK_ITEM###-->###MORE###<!--###LINK_ITEM###--></div>

<hr class="clearer" /></div>
		<!-- ###NEWS### end-->
	<!-- ###CONTENT###  end -->
	<div class="news-list-browse">###BROWSE_LINKS###</div>
</div>
<!-- ###TEMPLATE_LIST### end -->







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

<!-- ###TEMPLATE_SINGLE### begin
	This subpart is used to display single news items
-->
<div class="news-single-item_content">
<div class="news-single-item">
###NEWS_CATEGORY_ROOTLINE###
		<div id="title_news"><h2>###NEWS_TITLE### ###COUNTER### ###CALL_COUNTER###</h2></div>###CATWRAP_B### ###TEXT_CAT### ###NEWS_CATEGORY### ###NEWS_CATEGORY_IMAGE### ###CATWRAP_E###
		###NEWS_AUTHOR###
		<br /><br />###NEWS_SUBHEADER###
		###NEWS_IMAGE### 
		###NEWS_CONTENT###
		<hr class="clearer" />
			###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 class="news-single-timedata">###NEWS_DATE### ###NEWS_TIME###</div>
</div>
</div>		
<!-- ###TEMPLATE_SINGLE### end -->












<br />
<br /><hr />
<br />
<br />
<br />
<h3>TEMPLATE_SINGLE_RECORDINSERT</h3>
<em>This subpart is used to display single news items with the &quot;Insert Records&quot; 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###</div>
			<h2>###NEWS_TITLE###</h2>
			###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###
###COMMENTS###
###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 &quot;Insert Records&quot; 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###</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 -->












<br />
<br />
<br />
<br />
<hr />
<br />
<br />
<br />
<h3>TEMPLATE_ARCHIVE</h3>
<em>Subpart for the news archive menu.</em><br />
<br />
<br />
<!-- ###TEMPLATE_ARCHIVE### begin
	Subpart for the news archive menu 
 -->
<div class="news-amenu-container">
	<h3>###ARCHIVE_HEADER###</h3>
	<ul>
	<!-- ###CONTENT### begin -->
		<!-- ###MENUITEM### begin -->
		<li class="link_li"><!--###LINK_ITEM###-->###ARCHIVE_TITLE###: ###ARCHIVE_COUNT### ###ARCHIVE_ITEMS###<!--###LINK_ITEM###--></li>
		<!-- ###MENUITEM### end-->
	<!-- ###CONTENT###  end -->
	</ul>
</div>
<!-- ###TEMPLATE_ARCHIVE### end -->


<br />
<br />
<br />
<br />
<hr />
<br />
<br />
<br />
<h3>TEMPLATE_ARCHIVE_NOITEMS</h3>
<em>Shown if the archive has no items!</em><br />
<br />
<br />
<!-- ###TEMPLATE_ARCHIVE_NOITEMS### begin
	Shown if the archive has no items!
-->
<div class="news-amenu-container">
		<h2>###ARCHIVE_HEADER###</h2>
	    <ul>
		<li>###ARCHIVE_EMPTY_MSG###</li>
		</ul>		
</div>
<!-- ###TEMPLATE_ARCHIVE_NOITEMS### end -->






<br />
<br />
<br />
<br />
<hr />
<br />
<br />
<br />
<h3>TEMPLATE_SEARCH</h3>
<em>Subpart for the search-form.</em><br />
<br />
<br />

<!-- ###TEMPLATE_SEARCH### begin
	Subpart for the search-form
-->
<div class="news-search-form">
<form method="post" action="###FORM_URL###" name="searchnewsform">
	<input size="25" class="input" maxlength="100" type="text" name="tx_ttnews[swords]" value="###SWORDS###" />
	<input type="button" name="search" class="submit" value="[ ###SEARCH_BUTTON### ]" onmouseover="this.className='submitover'" onmouseout="this.className='submit'" onclick="post_search_form();"  />
</form></div>
<!-- ###TEMPLATE_SEARCH### end -->

<br />
<hr /><br />
<h3>this is shown if the search result is empty </h3>
  <br />
<!-- ###TEMPLATE_SEARCH_EMPTY### begin -->
<div class="news-search-emptyMsg">###SEARCH_EMPTY_MSG###</div> 
<!-- ###TEMPLATE_SEARCH_EMPTY### end -->

<br /><br />
<br />
<hr /><br />
<h3>TEMPLATE_HEADER_LIST</h3>
<em>shows a list of news titles</em><br />

<br />
<!-- ###TEMPLATE_HEADER_LIST### begin -->

	<!-- ###CONTENT### begin
		  This is the part of the template substituted with the list of news: 
	-->
		<!-- ###NEWS### begin 
			Template for a single item 
		-->
			<div class="news-header-list-container">
					<div class="news-header-list-title"> <!--###LINK_ITEM###-->###NEWS_TITLE###<!--###LINK_ITEM###--></div>
					<div class="news-header-list-time"> ###NEWS_TIME###</div>
					<div class="news-header-list-categories">###TEXT_CAT_LATEST### ###NEWS_CATEGORY### ###NEWS_CATEGORY_IMAGE###</div>
					
			</div>

		<!-- ###NEWS### end-->
		
	<!-- ###CONTENT###  end -->
 ###BROWSE_LINKS###

<!-- ###TEMPLATE_HEADER_LIST### end -->
<br /><br />
<br />
<hr /><br />
<h3>TEMPLATE_CAT_RELATED</h3>
<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 />
<br />
<br />




</body>
</html>