Code: Alles auswählen
Liste alle Artikel unterhalb einer Kategorie auf.
moeglichkeiten
-----------------------------------------------
- kategorie auswaehlen
- sortierung nach
- sortierungsrichtung
- limit artikel pro seite
- limit anzeige artikle insgesamt
- limit zeichen fuer artikelinhalt in artikelliste
- startikel einbinden ja/nein
- ueberschrift fuer artikeliste
- formatierungsmoeglichkeit fuer option 'sortierung nach' zur anzeige in artikelliste(nur datum)
- 1. bild des artikels anzeigen
- groesse das bildes anpassen
- angabe fuer name des templatefile
- angabe fuer name des templatefile bei nicht vorhandensein von artikeln
Template-Vars
-----------------------------------------------
{TITLE} - Vorgabe fuer Headlinie der Artikelliste aus der Konfiguration
{SORTVALUE} - Ausgabe der Sortierungvorgabe(Sinnvoll fuer News, da so Newsdatum angezeigt werden kann)
{HEADLINE} - Ueberschrift des Artikels OHNE html-tags
{TEXT} - Inhalt des Artikels OHNE html-tags und begrenzt auf konfigurierte Anzahl von Zeichen
{IMG} - 1. Bild des Artikels
{PAGE} - Links zu den Seiten der Artikeliste, bei mehr Artikel als des konfigurierte Limit
Code: Alles auswählen
?><?php
/***********************************************
* CONTENIDO MODUL - INPUT
*
* Modulname: yaal( yet another articlelist ;) )
* Author(s): rene hankel
* Copyright: michse
* Created: 2007.03.27
* Version: 0.4
* based on: modul 'News' by Andreas Lindner, 4fb
*
************************************************/
//----------------------------------------------------------------
// get vars
unset($lo_set);
$lo_set = array();
$lo_set["IdCat"] = "CMS_VALUE[1]";
$lo_set["SortBy"] = "CMS_VALUE[3]";
$lo_set["Headlinie"] = "CMS_VALUE[4]";
$lo_set["ShowImg"] = "CMS_VALUE[13]";
$lo_set["ImgWidth"] = "CMS_VALUE[14]";
$lo_set["LimitArt"] = "CMS_VALUE[15]";
$lo_set["SortDir"] = "CMS_VALUE[16]";
$lo_set["IncStartArt"] = "CMS_VALUE[17]";
$lo_set["Template"] = "CMS_VALUE[18]";
$lo_set["TemplateNoArt"] = "CMS_VALUE[19]";
$lo_set["MaxArt"] = "CMS_VALUE[20]";
$lo_set["MaxCharContent"] = "CMS_VALUE[21]";
$lo_set["ImgHeight"] = "CMS_VALUE[22]";
$lo_set["SortValueFormat"] = "CMS_VALUE[23]";
//----------------------------------------------------------------
// default vars
$lo_default_sortby = 'created';
$lo_default_sortdir = 'desc';
$lo_default_template = 'yaal.html';
$lo_default_templatenoart = 'yaal_noart.html';
$lo_default_limitart = 5;
$lo_default_maxart = 50;
$lo_default_maxcharcontent = 200;
$lo_default_imgwidth = 200;
$lo_default_imgheight = 200;
$lo_default_sortvalue = '%Y.%m.%d';
//----------------------------------------------------------------
// Base settings
if(
($lo_set["SortBy"] != 'created') &&
($lo_set["SortBy"] != 'lastmodified') &&
($lo_set["SortBy"] != 'published') &&
($lo_set["SortBy"] != 'artsort') &&
($lo_set["SortBy"] != 'title')
)
{ $lo_set["SortBy"] = $lo_default_sortby; }
if( ($lo_set["SortDir"] != 'desc') && ($lo_set["SortDir"] != 'asc') )
{ $lo_set["SortDir"] = $lo_default_sortdir; }
if( strlen($lo_set["Template"]) == 0 )
{ $lo_set["Template"] = $lo_default_template; }
if( strlen($lo_set["TemplateNoArt"]) == 0 )
{ $lo_set["TemplateNoArt"] = $lo_default_templatenoart; }
if( (int)$lo_set["LimitArt"] <= 0 )
{ $lo_set["LimitArt"] = $lo_default_limitart; }
if( (int)$lo_set["MaxArt"] <= 0 )
{ $lo_set["MaxArt"] = $lo_default_maxart; }
if( (int)$lo_set["MaxCharContent"] < 0 )
{ $lo_set["MaxCharContent"] = $lo_default_maxcharcontent; }
elseif( strlen($lo_set["MaxCharContent"]) == 0 )
{ $lo_set["MaxCharContent"] = 0; }
if( (int)$lo_set["ImgWidth"] <= 0 )
{ $lo_set["ImgWidth"] = $lo_default_imgwidth; }
if( (int)$lo_set["ImgHeight"] <= 0 )
{ $lo_set["ImgHeight"] = $lo_default_imgheight; }
if( strlen($lo_set["SortValueFormat"]) == 0 )
{ $lo_set["SortValueFormat"] = $lo_default_sortvalue; }
echo '<table cellpadding="0" cellspacing="0" border="0">'."\n";
//----------------------------------------------------------------
// kategorie auswaehlen
echo '<tr>'."\n";
echo ' <td class="text_medium" style="padding:5px">'.mi18n("Select category").': </td>'."\n";
echo ' <td class="text_medium" style="padding:5px">';
echo buildCategorySelect("CMS_VAR[1]", $lo_set["IdCat"]);
echo ' <input type="image" src="images/submit.gif">';
echo ' </td>'."\n";
echo '</tr>'."\n";
//----------------------------------------------------------------
// trennlinie
echo '<tr><td colspan="2"><hr></td></tr>'."\n";
//----------------------------------------------------------------
// sortierung nach ...
echo '<tr>'."\n";
echo ' <td class="text_medium" style="padding:5px;">'.mi18n("Sort by").':</td>'."\n";
echo ' <td class="text_medium" style="padding:5px">';
echo ' <select name="CMS_VAR[3]">'."\n";
// erstellungszeit
if( ($lo_set["SortBy"] == '') || ($lo_set["SortBy"] == 'created') )
{ echo '<option value="created" selected>'.mi18n("Add Date").'</option>'."\n"; }
else
{ echo '<option value="created">'.mi18n("Add Date").'</option>'."\n"; }
// letzte aenderung
if( $lo_set["SortBy"] == 'lastmodified' )
{ echo '<option value="lastmodified" selected>'.mi18n("Last Modified Date").'</option>'."\n"; }
else
{ echo '<option value="lastmodified">'.mi18n("Last Modified Date").'</option>'."\n"; }
// veroeffentlichungs datum
if( $lo_set["SortBy"] == 'published' )
{ echo '<option value="published" selected>'.mi18n("Published Date").'</option>'."\n"; }
else
{ echo '<option value="published">'.mi18n("Published Date").'</option>'."\n"; }
// artikelsorierung
if( $lo_set["SortBy"] == 'artsort' )
{ echo '<option value="artsort" selected>'.mi18n("Articlesort").'</option>'."\n"; }
else
{ echo '<option value="artsort">'.mi18n("Articlesort").'</option>'."\n"; }
// title
if( $lo_set["SortBy"] == 'title' )
{ echo '<option value="title" selected>'.mi18n("Title").'</option>'."\n"; }
else
{ echo '<option value="title">'.mi18n("Title").'</option>'."\n"; }
echo ' </select>'."\n";
echo ' </td>'."\n";
echo '</tr>'."\n";
//----------------------------------------------------------------
// sortierungsrichtung
echo '</tr>'."\n";
echo ' <td class="text_medium" style="padding:5px;">'.mi18n("ascending sorting").':</td>'."\n";
echo ' <td style="padding:5px;">'."\n";
if( strtolower($lo_set["SortDir"]) == 'desc' )
{ echo '<input type="radio" name="CMS_VAR[16]" value="asc"/>'."\n"; }
else
{ echo '<input type="radio" name="CMS_VAR[16]" value="asc" checked/>'."\n"; }
echo ' </td>'."\n";
echo '</tr>'."\n";
echo '<tr>'."\n";
echo ' <td class="text_medium" style="padding:5px;">'.mi18n("descending sorting").':</td>'."\n";
echo ' <td style="padding:5px;">'."\n";
if( strtolower($lo_set["SortDir"]) == 'desc' )
{ echo '<input type="radio" name="CMS_VAR[16]" value="desc" checked/>'."\n"; }
else
{ echo '<input type="radio" name="CMS_VAR[16]" value="desc"/>'."\n"; }
echo ' </td>'."\n";
echo '</tr>'."\n";
//----------------------------------------------------------------
// trennlinie
echo '<tr><td colspan="2"><hr></td></tr>'."\n";
//----------------------------------------------------------------
// Number of articles
echo '<tr>'."\n";
echo ' <td class="text_medium" style="padding:5px;">'.mi18n("Limit of article per site").':</td>'."\n";
echo ' <td style="padding:5px;"><input type="text" name="CMS_VAR[15]" value="'.$lo_set["LimitArt"].'"></td>'."\n";
echo '</tr>'."\n";
echo '<tr>'."\n";
echo ' <td class="text_medium" style="padding:5px;">'.mi18n("Show max article").':</td>'."\n";
echo ' <td style="padding:5px;"><input type="text" name="CMS_VAR[20]" value="'.$lo_set["MaxArt"].'"></td>'."\n";
echo '</tr>'."\n";
echo '<tr>'."\n";
echo ' <td class="text_medium" style="padding:5px;">'.mi18n("Show max char for content").':</td>'."\n";
echo ' <td style="padding:5px;"><input type="text" name="CMS_VAR[21]" value="'.$lo_set["MaxCharContent"].'"></td>'."\n";
echo '</tr>'."\n";
//----------------------------------------------------------------
// trennlinie
echo '<tr><td colspan="2"><hr></td></tr>'."\n";
//----------------------------------------------------------------
// Include start article
echo '<tr>'."\n";
echo '<td class="text_medium" style="padding:5px;">'.mi18n("Include startarticle in list").':</td>'."\n";
echo ' <td style="padding:5px;"><input type="checkbox" name="CMS_VAR[17]" value="true"';
if( $lo_set["IncStartArt"] == 'true' )
{ echo ' checked'; }
echo '></td>'."\n";
echo '</tr>'."\n";
//----------------------------------------------------------------
// trennlinie
echo '<tr><td colspan="2"><hr></td></tr>'."\n";
//----------------------------------------------------------------
// ueberschrift
echo '<tr>'."\n";
echo ' <td class="text_medium" style="padding:5px;">'.mi18n("Headline").': </td>'."\n";
echo ' <td class="text_medium" style="padding:5px;"><input type="text" name="CMS_VAR[4]" value="'.$lo_set["Headlinie"].'">';
echo ' <span style="font-weight: bold; font-size: 90%;">{TITLE}</span>';
echo ' </td>'."\n";
echo '</tr>'."\n";
// format fuer anzeige datumssortierung
echo '<tr>'."\n";
echo ' <td class="text_medium" style="padding:5px;">'.mi18n("Format 'sort by'").':</td>'."\n";
echo ' <td class="text_medium" style="padding:5px;"><input type="text" name="CMS_VAR[23]" value="'.$lo_set["SortValueFormat"].'">';
echo ' <span style="font-weight: bold; font-size: 90%;">{SORTVALUE}</span>';
echo ' </td>'."\n";
echo '</tr>'."\n";
//----------------------------------------------------------------
// trennlinie
echo '<tr><td colspan="2"><hr></td></tr>'."\n";
//----------------------------------------------------------------
// einstellung zu bildern
echo '<tr>'."\n";
echo ' <td class="text_medium" style="padding:5px;">'.mi18n("show first image of article in list").':</td>'."\n";
echo ' <td style="padding:5px;"><input type="checkbox" name="CMS_VAR[13]" value="true"';
if( $lo_set["ShowImg"] == 'true' )
{ echo ' checked'; }
echo '></td>'."\n";
echo '</tr>'."\n";
// bildbreite
echo '<tr>'."\n";
echo ' <td class="text_medium" style="padding:5px;">'.mi18n("Image width").': </td>'."\n";
echo ' <td style="padding:5px;"><input type="text" name="CMS_VAR[14]" value="'.$lo_set["ImgWidth"].'" maxlength="3">px</td>'."\n";
echo '</tr>'."\n";
// bildhoehe
echo '<tr>'."\n";
echo ' <td class="text_medium" style="padding:5px;">'.mi18n("Image height").': </td>'."\n";
echo ' <td style="padding:5px;"><input type="text" name="CMS_VAR[22]" value="'.$lo_set["ImgHeight"].'" maxlength="3">px</td>'."\n";
echo '</tr>'."\n";
//----------------------------------------------------------------
// trennlinie
echo '<tr><td colspan="2"><hr></td></tr>'."\n";
//----------------------------------------------------------------
// templates
echo '<tr>'."\n";
echo ' <td class="text_medium" style="padding:5px;">'.mi18n("Name of templatefile").': </td>'."\n";
echo ' <td style="padding:5px;"><input type="text" name="CMS_VAR[18]" value="'.$lo_set["Template"].'"></td>'."\n";
echo '</tr>'."\n";
echo '<tr>'."\n";
echo ' <td class="text_medium" style="padding:5px;">'.mi18n("Name of templatefile for 'no article found'").': </td>'."\n";
echo ' <td style="padding:5px;"><input type="text" name="CMS_VAR[19]" value="'.$lo_set["TemplateNoArt"].'"></td>'."\n";
echo '</tr>'."\n";
echo '</table>'."\n";
?><?php
Code: Alles auswählen
<?php
/***********************************************
* CONTENIDO MODUL - OUTPUT
*
* Modulname: yaal( yet another articlelist ;) )
* Author(s): rene hankel
* Copyright: michse
* Created: 2007.03.27
* Version: 0.4
* based on: modul 'News' by Andreas Lindner, 4fb
*
************************************************/
cInclude('classes', 'class.article.php');
cInclude('includes', 'functions.api.string.php');
cInclude('includes', 'functions.api.images.php');
//----------------------------------------------------------------
// get vars
unset($lo_set);
$lo_set = array();
$lo_set["IdCat"] = "CMS_VALUE[1]";
$lo_set["SortBy"] = "CMS_VALUE[3]";
$lo_set["Headlinie"] = "CMS_VALUE[4]";
$lo_set["ShowImg"] = "CMS_VALUE[13]";
$lo_set["ImgWidth"] = "CMS_VALUE[14]";
$lo_set["LimitArt"] = "CMS_VALUE[15]";
$lo_set["SortDir"] = "CMS_VALUE[16]";
$lo_set["IncStartArt"] = "CMS_VALUE[17]";
$lo_set["Template"] = "CMS_VALUE[18]";
$lo_set["TemplateNoArt"] = "CMS_VALUE[19]";
$lo_set["MaxArt"] = "CMS_VALUE[20]";
$lo_set["MaxCharContent"] = "CMS_VALUE[21]";
$lo_set["ImgHeight"] = "CMS_VALUE[22]";
$lo_set["SortValueFormat"] = "CMS_VALUE[23]";
//----------------------------------------------------------------
// default vars
$lo_default_sortby = 'created';
$lo_default_sortdir = 'desc';
$lo_default_template = 'yaal.html';
$lo_default_templatenoart = 'yaal_noart.html';
$lo_default_limitart = 5;
$lo_default_maxart = 50;
$lo_default_maxcharcontent = 200;
$lo_default_imgwidth = 200;
$lo_default_imgheight = 200;
$lo_default_sortvalue = '%Y.%m.%d';
//----------------------------------------------------------------
// Base settings
if(
($lo_set["SortBy"] != 'created') &&
($lo_set["SortBy"] != 'lastmodified') &&
($lo_set["SortBy"] != 'published') &&
($lo_set["SortBy"] != 'artsort') &&
($lo_set["SortBy"] != 'title')
)
{ $lo_set["SortBy"] = $lo_default_sortby; }
if( ($lo_set["SortDir"] != 'desc') && ($lo_set["SortDir"] != 'asc') )
{ $lo_set["SortDir"] = $lo_default_sortdir; }
if( strlen($lo_set["Template"]) == 0 )
{ $lo_set["Template"] = $lo_default_template; }
if( strlen($lo_set["TemplateNoArt"]) == 0 )
{ $lo_set["TemplateNoArt"] = $lo_default_templatenoart; }
if( (int)$lo_set["LimitArt"] <= 0 )
{ $lo_set["LimitArt"] = $lo_default_limitart; }
if( (int)$lo_set["MaxArt"] <= 0 )
{ $lo_set["MaxArt"] = $lo_default_maxart; }
if( (int)$lo_set["MaxCharContent"] < 0 )
{ $lo_set["MaxCharContent"] = $lo_default_maxcharcontent; }
elseif( strlen($lo_set["MaxCharContent"]) == 0 )
{ $lo_set["MaxCharContent"] = 0; }
if( (int)$lo_set["ImgWidth"] <= 0 )
{ $lo_set["ImgWidth"] = $lo_default_imgwidth; }
if( (int)$lo_set["ImgHeight"] <= 0 )
{ $lo_set["ImgHeight"] = $lo_default_imgheight; }
if( strlen($lo_set["SortValueFormat"]) == 0 )
{ $lo_set["SortValueFormat"] = $lo_default_sortvalue; }
//----------------------------------------------------------------
// lokale zusatz vars
$lo_seite = 1;
$lo_limit = 0;
$lo_articleid = 0;
$lo_page = (int)$_REQUEST['page'];
$lo_pagelnk = '';
$lo_href = '';
$lo_filename = '';
$lo_dirname= '';
$lo_teaserimghref = '';
$lo_imgname = '';
$lo_tplimg = '';
$lo_tplhref = '';
$lo_tplheadline = '';
$lo_tpltext = '';
$lo_pagearr = array();
$lo_tmparr = array();
$lo_options = array();
$lo_limitart = 0;
//----------------------------------------------------------------
// template obj erstellen
if (!is_object($lo_tpl))
{ $lo_tpl = new Template; }
//----------------------------------------------------------------
// allgemeine template sachen
$lo_tpl->reset();
$lo_tpl->set('s', 'TITLE', $lo_set["Headlinie"]);
//----------------------------------------------------------------
// wenn 'idcat' vorhanden und nicht null
if( (strlen($lo_set["IdCat"]) > 0) && ((int)$lo_set["IdCat"] != 0) )
{
// optionsarray fur artikelabfrage erstellen
$lo_options['idcat'] = $lo_set["IdCat"];
if( $lo_set["IncStartArt"] == 'true' )
{ $lo_options['start'] = true; }
else
{ $lo_options['start'] = false; }
$lo_options['order'] = $lo_set["SortBy"];
$lo_options['direction'] = $lo_set["SortDir"];
// artikel abfragen
$lo_artlist = new ArticleCollection($lo_options);
//----------------------------------------------------------------
// falls artikel vorliegen
if ($lo_artlist->count > 0)
{
//----------------------------------------------------------------
// pruefe ob vorhanden artikelanzahl groesser ist als
// max angezeigt werden sollen
if( $lo_set["MaxArt"] < $lo_artlist->count )
{ $lo_limitart = $lo_set["MaxArt"]; }
else
{ $lo_limitart = $lo_artlist->count; }
//--------------------------------------------
// page seiten und offset erstellen
while( true )
{
// falls offset erreicht wurde, abbrechen
if( $lo_limit >= $lo_limitart )
{
// damit array wenigsten 0 werte enthaelt
if( count($lo_pagearr) == 0 )
{ $lo_pagearr[1] = 0;}
break;
}
// neue seite mit zugehoerigen offset einfuegen
$lo_pagearr[$lo_seite] = $lo_limit;
// offset errechnen
$lo_limit += $lo_set["LimitArt"];
// seitenzahl erhoehen
$lo_seite += 1;
}
//----------------------------------------------------------------
// pruefe ob var 'page' in den moeglichen seitenangaben existiert
if( array_key_exists($lo_page, $lo_pagearr) )
{}
else
{ $lo_page = 1; }
//----------------------------------------------------------------
// durchlaufe alle gefundenen artikel
for( $i = 0; $i < $lo_limitart; $i++ )
{
// hole naechsten artikel
$lo_article = $lo_artlist->nextArticle();
//echo $lo_page.'<pre>';print_r($lo_article);echo '</pre>';
//----------------------------------------------------------------
// zeige artikel an, wenn er innerhalb der zu zeigenden page liegt
if( ($i >= $lo_pagearr[$lo_page]) && ($i <($lo_pagearr[$lo_page]+$lo_set["LimitArt"])) )
{
$lo_articleid = $lo_article->getField('idart');
$lo_tplimg = '';
//----------------------------------------------------------------
// falls bild angezeigt werden soll
if( $lo_set["ShowImg"] == 'true' )
{
// hole artikelinhalt
$text_html = $lo_article->getContent('CMS_HTML', 1);
// suche nach bildern
$regEx = "/<img[^>]*?>.*?/i";
$match = array ();
preg_match($regEx, $text_html, $match);
// suche nach bildquelle und splite pfad auf
$regEx = "/(src)(=)(['\"]?)([^\"']*)(['\"]?)/i";
$img = array ();
preg_match($regEx, $match[0], $img);
$img_src = preg_split("/\//", $img[0]);
// finde dateinanem ohne endung
$img_name = $img_src[count($img_src) - 1];
$img_name = preg_replace("/\"/", "", $img_name);
$img_split = preg_split("/\./", $img_name);
$img_type = $img_split[count($img_split) - 1];
$img_split2 = preg_split("/_/", $img_split[0]);
$lo_imgname = $img_name;
if (count($img_split2) > 1)
{
$img_x = $img_split2[count($img_split2) - 1];
$img_y = $img_split2[count($img_split2) - 2];
if (is_numeric($img_x) AND is_numeric($img_y))
{
$suffix = "_".$img_x."_".$img_y.".".$img_type;
$lo_imgname = preg_replace("/$suffix/", "", $img_name);
$lo_imgname = $lo_imgname.".[a-zA-Z]{3}";
}
}
$lo_teaserimghref = '';
//----------------------------------------------------------------
// bild vorhanden ist vorhanden
if( strlen($lo_imgname) > 0 )
{
$sql = 'SELECT * FROM '.$cfg["tab"]["upl"].' WHERE filename REGEXP \''.$lo_imgname.'\'';
$db->query($sql);
// bild info abfragen
if ($db->next_record())
{
$lo_filename = $db->f('filename');
$lo_dirname = $db->f('dirname');
}
// dateipfad zusammensetzen
$img_path = $cfgClient[$client]["upl"]["path"].$lo_dirname.$lo_filename;
// href des bildes erzeugen
$lo_teaserimghref = capiImgScale($img_path, $lo_set["ImgWidth"], $lo_set["ImgHeight"], $crop = false, $expand = false, $cacheTime = 1000, $wantHQ = false);
} // end if strlen
//----------------------------------------------------------------
// falls href des bildes gefunden
if (strlen($lo_teaserimghref) > 0)
{ $lo_tplimg = '<img src="'.$lo_teaserimghref.'" alt="'.$lo_imgname.'">'; }
else
{ $lo_tplimg = ''; }
} // end if noimg
// html-tags entfernen
$lo_tplheadline = strip_tags($lo_article->getContent('CMS_HTMLHEAD', 1));
$lo_tplheadline = str_replace($replace, " ", $lo_tplheadline);
$lo_tplhref = $sess->url('front_content.php?idcat='.$lo_set["IdCat"].'&idart='.$lo_articleid);
$lo_tpltext = $lo_article->getField('summary');
//----------------------------------------------------------------
if (strlen(trim($lo_tpltext)) == 0)
{
$lo_tpltext = strip_tags($lo_article->getContent('CMS_HTML', 1));
// wenn text laenger als gewuenscht ist
if( strlen($lo_tpltext) > $lo_set["MaxCharContent"] )
{
// wenn text angezeigt werden soll
if( (int)$lo_set["MaxCharContent"] > 0 )
{
$lo_tpltext = capiStrTrimAfterWord($lo_tpltext, (int)$lo_set["MaxCharContent"]);
$lo_tpltext .= '...';
}
else
{ $lo_tpltext = ''; }
}
} // end if
$lo_tpltext = $lo_tpltext.' ';
// wenn sortierungsoption zeitwert ist, dann formatieren
if( ($lo_set["SortBy"] == 'created') || ($lo_set["SortBy"] == 'lastmodified') || ($lo_set["SortBy"] == 'published') )
{ $lo_tpl->set('d', 'SORTVALUE', strftime($lo_set["SortValueFormat"], strtotime($lo_article->getField($lo_set["SortBy"]))) ); }
else
{ $lo_tpl->set('d', 'SORTVALUE', $lo_article->getField($lo_set["SortBy"]) ); }
// andere templatevars
$lo_tpl->set('d', 'HEADLINE', $lo_tplheadline);
$lo_tpl->set('d', 'TEXT', $lo_tpltext);
$lo_tpl->set('d', 'HREF', $lo_tplhref);
$lo_tpl->set('d', 'IMG', $lo_tplimg);
$lo_tpl->next();
} // end for
}
//----------------------------------------------------------------
// pagelinks erstellen
foreach( $lo_pagearr as $lo_key => $lo_value)
{
$lo_href = $sess->url('front_content.php?idcat='.$lo_set["IdCat"].'&page='.$lo_key);
if( $lo_page == $lo_key )
{ $lo_pagelnk .= '<strong>'.$lo_key.'</strong> '; }
else
{ $lo_pagelnk .= '<a href="'.$lo_href.'">'.$lo_key.'</a> '; }
}
$lo_tpl->set('s', 'PAGE', $lo_pagelnk);
$lo_tpl->generate('templates/'.$lo_set["Template"]);
}
//----------------------------------------------------------------
// keine artikel vorhanden
else
{
$lo_tpl->generate('templates/'.$lo_set["TemplateNoArt"]);
}
}
?>
Code: Alles auswählen
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<div>
<div>
{TITLE}
</div>
</div>
<!-- BEGIN:BLOCK -->
<div>
<img src="images/arrow_gray.jpg" ALT="">
<span>{SORTVALUE}</span>
<a href="{HREF}" >{HEADLINE}</a><br>
{TEXT}<br>
{IMG}
</div>
<div><img src="images/spacer.gif" height="1" width="1" ALT=""></div>
<!-- END:BLOCK -->
</td>
</tr>
<tr>
<td >
<div>
<div>
Seite(n): {PAGE}
</div>
</div>
</td>
</tr>
</table>