ich hab ein Teaser Modul für Bilder an meine bedürfnisse angepasst (vielmehr zusammengestückelt). Nun möchte ich aber noch eine simple Onlin/Ofline Abfrage einsetzen.
Ich hab schon einige Sachen probiert aber ich bekomm es einfach nicht hin.
Kann mir jemand dabei helfen?
So sieht mein AusgabeCode aus:
- Code: Alles auswählen
<?
$cat = OOCategory::getCategoryById($this->getValue(category_id));
$cats = $cat->getChildren();
$i = 0;
$j = 0;
$c = 0;
$table = array();
$table[0] = array(); // Head
$table[1] = array(); // Content
$content = "";
if (is_array($cats)) {
foreach ($cats as $cat) {
$catId = $cat->getId();
$catName = $cat->getName();
$article = $cat->getArticles();
if (is_array($article)) {
foreach ($article as $var) {
$articleId = $var->getId();
$articleName = $var->getName();
$articleDescription = $var->getDescription();
if($var->getValue("file") == ''){ $articlePicture = 'test.gif '; } else { $articlePicture = $var->getValue("file"); }
$articlePPath = "index.php?rex_resize=130c__100h__".$articlePicture;
$content .= '<p><span>'.$articleName.'</span><a href="index.php?article_id='.$articleId.'"><img src="'.$articlePPath.'" alt="zur Galerie" /></a></p>';
}
}
}
}
/*
if($j != 0)
{
echo '<table>';
while($i <= $j)
{
if($c == 0) { echo '<tr>'; }
echo '<td><div class="galerie-teaser">'.$table[0][$i].'</div><div>'.$table[1][$i].'</div></td>';
$i++;
$c++;
if($c >= 4) { echo '</tr>'; $c = 0; }
}
}
if($c != 0)
{
while($c < 4)
{
echo '<td></td>';
$c++;
}
}*/
echo '<div id="galerie-teaser">'.$content.'</div>';
?>

